Closed Bug 1467010 Opened 6 years ago Closed 10 months ago

Add Accept-Encoding: identity to Range requests

Categories

(Core :: Networking: HTTP, enhancement, P3)

enhancement

Tracking

()

RESOLVED WORKSFORME
Tracking Status
firefox62 --- affected

People

(Reporter: jaffathecake, Unassigned)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [necko-triaged])

Spec change: https://github.com/whatwg/fetch/pull/751
Tests: https://github.com/web-platform-tests/wpt/pull/11291

Turns out a significant number of servers ignore Range headers unless "Accept-Encoding: identity" is set. This spec change applies that header to all requests with a Range header.

Firefox current omits the Accept-Encoding header for media requests, which feels risky.

Perhaps related: https://bugzilla.mozilla.org/show_bug.cgi?id=613159
Blocks: fetch
Component: Untriaged → Networking
Product: Firefox → Core
I find that an unfortunate restriction in those servers, but I suppose that doesn't change anything... =)
Component: Networking → Networking: HTTP
Priority: -- → P3
Whiteboard: [necko-triaged]
I agree, but it prevents a pretty big gotcha.

We could in future provide an opt-out of this. It would require some way for developers and spec authors to say "give me the body before decoding", along with a way to set the `Accept-Encoding` header.

Firefox fails a bunch of tests because of this: https://wpt.fyi/results/fetch/range?label=experimental&label=master&aligned.

Blocks: 1528779

The bug has a release status flag that shows some version of Firefox is affected, thus it will be considered confirmed.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Severity: normal → S3

We are already doing this: https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsHttpChannel.cpp#793-798

The remaining WPT failures listed in comment 4 will mostly pass after the patch in bug 1784880 lands, with the failure in general.any.serviceworker.html being shared among browsers right now, and the timeouts/crashing in sw.https.window.html seeming unrelated (the tests pass for me locally, so it's not likely to be related to this).

Status: NEW → RESOLVED
Closed: 10 months ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.