Fetch requests with the `range` header don't set `Accept-Encoding: identity`
Categories
(Core :: DOM: Networking, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox148 | --- | fixed |
People
(Reporter: valadaptive, Assigned: valadaptive)
References
Details
(Keywords: webcompat:platform-bug, Whiteboard: [necko-triaged])
Attachments
(3 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0
Steps to reproduce:
Make an HTTP request that uses the range header (see the attached file for a demo).
Actual results:
In servers that gzip the response, Firefox will not behave properly because it does not set Accept-Encoding: identity. In the attached demo, compare the results in Chrome and Firefox (you'll need to use the network tab in the inspector since Content-Encoding on the response side is not CORS-safelisted, or at least I think that's why it's not showing up).
In Chrome, the demo functions properly--the request headers contain Accept-Encoding: identity and the response headers omit Content-Encoding. In Firefox, the demo is broken--no results are shown, the request headers contain Accept-Encoding: gzip, deflate, br, zstd, identity, and the response headers contain content-encoding: gzip.
Expected results:
Fetch requests with the range header set should also set accept-encoding: identity, per https://github.com/whatwg/fetch/pull/751. This was apparently implemented in https://bugzilla.mozilla.org/show_bug.cgi?id=1782835, but seems to have regressed?
I'm running Firefox 141.0 as packaged for Fedora 42. Not sure if this is platform-specific.
Comment 1•6 months ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::DOM: Networking' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
| Assignee | ||
Comment 2•6 months ago
|
||
The merge flag in HttpBaseChannel::SetRequestHeader corresponds to the
"combine a header" behavior in the fetch spec, in which we add a value
to a comma-separated list of values in the header. The fetch spec does
not tell us to combine (Accept-Encoding, identity), it tells us to
append it. We got away with this before because of a sneaky WPT change
that I'm fixing upstream
(https://github.com/web-platform-tests/wpt/pull/54373).
Updated•6 months ago
|
Updated•6 months ago
|
Comment 4•3 months ago
|
||
We should land this. I think the WPT need updating.
Updated•2 months ago
|
Comment 5•2 months ago
|
||
https://hg.mozilla.org/mozilla-central/rev/9e3407d0a287
https://hg.mozilla.org/mozilla-central/rev/a936cc213f6d
Updated•1 month ago
|
Updated•1 month ago
|
Description
•