Closed Bug 1470234 Opened 6 years ago Closed 6 years ago

handle empty headers correctly when automatically copying headers to InterceptedHttpChannel

Categories

(Core :: DOM: Service Workers, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: bkelly, Assigned: bkelly)

References

Details

Attachments

(1 file)

In bug 1468828 I added some automatic header copying when the nsHttpChannel does its special internal redirect to InterceptedHttpChannel.  I did not, however, handle empty headers correctly there.  A mochitest is failing because empty headers are being silently dropped during this copy operation.
Comment on attachment 8986837 [details] [diff] [review]
Handle empty headers correctly when auto-copying headers for special internal redirect to InterceptedHttpChannel. r=valentin

Valentin, this fixes a silly mistake in the previous bug.  We need to call SetEmptyRequestHeader() when appropriate.
Attachment #8986837 - Flags: review?(valentin.gosu)
Comment on attachment 8986837 [details] [diff] [review]
Handle empty headers correctly when auto-copying headers for special internal redirect to InterceptedHttpChannel. r=valentin

Review of attachment 8986837 [details] [diff] [review]:
-----------------------------------------------------------------

That's cool. Do we already have WPT tests that trigger this?
Attachment #8986837 - Flags: review?(valentin.gosu) → review+
No WPT test for it.  The mochitest that triggered it is:

  dom/tests/mochitest/fetch/test_fetch_cors_sw_reroute.html

At this subtest (plus a few other empty header ones in the same file):

  https://searchfox.org/mozilla-central/rev/d0a41d2e7770fc00df7844d5f840067cc35ba26f/dom/tests/mochitest/fetch/test_fetch_cors.js#277

I don't think I have time to convert the mochitest to a WPT at the moment, though.
If we have at least one test for it, that's fine. :)
Pushed by bkelly@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/ea5d5eea145b
Handle empty headers correctly when auto-copying headers for special internal redirect to InterceptedHttpChannel. r=valentin
https://hg.mozilla.org/mozilla-central/rev/ea5d5eea145b
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: