Repository navigation
Specify identity encoding for range requests. Fixes #747. - #751
Conversation
|
Tests: web-platform-tests/wpt#11291 |
|
This is different to what browser appear to implement. Chrome and Safari seem to special-case media, and they add the This PR adds I'm confident these differences are justified. If this is a weirdness for range requests, we should fix all range requests, and since the developer doesn't receive the encoded bytes, |
|
The PR looks good to me. I wonder what is the fetch spec policy regarding external links like https://jakearchibald.github.io/accept-encoding-range-test/.
That makes sense to me. This is simple to implement, will simplify range requests authoring, including when intercepted by service workers. There seems to be no justification for making Accept-Encoding a special privileged header at the moment. |
I reckon I can make it work in the latest versions of Safari, Chrome, Firefox, & Edge. The TransformStream stuff is just a performance enhancement, and mostly just me taking the opportunity to play with some new stuff.
I've got no problem with moving it. @annevk, any preferences? |
domfarolino
left a comment
There was a problem hiding this comment.
Looking good to me. Regarding the external URL, FWIW I know we make official references to triple-underscore translations (like https://triple-underscore.github.io/Streams-ja.html and https://triple-underscore.github.io/console-ja.html) which are of course hosted on non-whatwg owned properties. But yeah I'll defer to Anne for final call.
|
FWIW https://jakearchibald.github.io/accept-encoding-range-test/ now works across Safari, Chrome, Firefox & Edge. |
annevk
left a comment
There was a problem hiding this comment.
Historically WHATWG standards have included non-normative external links when they add a lot of background information, so this seems fine.
I think for certain canvas algorithms we might still normatively refer to books, even, which feels much worse and not a precedent I'd be happy with following.
| <a for=request>header list</a>. | ||
|
|
||
| <p class="note no-backref"> | ||
| <a href="https://jakearchibald.github.io/accept-encoding-range-test/">Many servers</a> |
There was a problem hiding this comment.
You cannot have a newline before <a here. We only allow whitespace at the end of paragraphs.
| `<code>DNT</code>`, and | ||
| `<code>Host</code>`, | ||
| are to be <a for="header list">appended</a> if necessary. | ||
| are to be <a for="header list">appended</a> if necessary, unless already specified. |
There was a problem hiding this comment.
This should be part of the normative requirement, no?
Modify httpRequest's header list per HTTP, except for headers already appended prior to this step.
|
@annevk I've tried to make the text normative, although it's a bit clunky. |
| <a for=request>header list</a>. | ||
|
|
||
| <p class="note no-backref"><a href="https://jakearchibald.github.io/accept-encoding-range-test/">Many | ||
| servers</a> mistakenly ignore `<code>Range</code>` headers if a non-identity encoding is |
There was a problem hiding this comment.
No newline here. Only HTML allows newlines in inlines. I can fix this up for you before landing though.
There was a problem hiding this comment.
Ah, I thought the fetch rule was only for references. Fixed.
|
With browser bugs this can land I think. I'll leave things another day for @youennf to comment. |
|
WebKit: https://bugs.webkit.org/show_bug.cgi?id=186335 (@youennf I couldn't find a general 'fetch' component for this to go in, so it may need triaged). Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1467010 (@annevk can you triage? The 'component' drop down seems to only contain irrelevant stuff these days). |
|
Thanks! I think WebKit doesn't really use components and for Firefox you want to use the Core product. The Firefox product is the frontend, mostly (similar to Blink/Chromium). |
…s, a=testonly Automatic update from web-platform-testsFetch: test identity encoding for range requests For whatwg/fetch#751. -- wpt-commits: 1421a4a976d4d8263bde4864a1ce412eba106d39 wpt-pr: 11291
…s, a=testonly Automatic update from web-platform-testsFetch: test identity encoding for range requests For whatwg/fetch#751. -- wpt-commits: 1421a4a976d4d8263bde4864a1ce412eba106d39 wpt-pr: 11291
…s, a=testonly Automatic update from web-platform-testsFetch: test identity encoding for range requests For whatwg/fetch#751. -- wpt-commits: 1421a4a976d4d8263bde4864a1ce412eba106d39 wpt-pr: 11291
…s, a=testonly Automatic update from web-platform-testsFetch: test identity encoding for range requests For whatwg/fetch#751. -- wpt-commits: 1421a4a976d4d8263bde4864a1ce412eba106d39 wpt-pr: 11291
…s, a=testonly Automatic update from web-platform-testsFetch: test identity encoding for range requests For whatwg/fetch#751. -- wpt-commits: 1421a4a976d4d8263bde4864a1ce412eba106d39 wpt-pr: 11291 UltraBlame original commit: febbc42c7d8f857afb981fa2d2958f5976a47729
…s, a=testonly Automatic update from web-platform-testsFetch: test identity encoding for range requests For whatwg/fetch#751. -- wpt-commits: 1421a4a976d4d8263bde4864a1ce412eba106d39 wpt-pr: 11291 UltraBlame original commit: 954f7290ff43966a30c2ab2806e6841ab3618059
…s, a=testonly Automatic update from web-platform-testsFetch: test identity encoding for range requests For whatwg/fetch#751. -- wpt-commits: 1421a4a976d4d8263bde4864a1ce412eba106d39 wpt-pr: 11291 UltraBlame original commit: febbc42c7d8f857afb981fa2d2958f5976a47729
…s, a=testonly Automatic update from web-platform-testsFetch: test identity encoding for range requests For whatwg/fetch#751. -- wpt-commits: 1421a4a976d4d8263bde4864a1ce412eba106d39 wpt-pr: 11291 UltraBlame original commit: 954f7290ff43966a30c2ab2806e6841ab3618059
…s, a=testonly Automatic update from web-platform-testsFetch: test identity encoding for range requests For whatwg/fetch#751. -- wpt-commits: 1421a4a976d4d8263bde4864a1ce412eba106d39 wpt-pr: 11291 UltraBlame original commit: febbc42c7d8f857afb981fa2d2958f5976a47729
…s, a=testonly Automatic update from web-platform-testsFetch: test identity encoding for range requests For whatwg/fetch#751. -- wpt-commits: 1421a4a976d4d8263bde4864a1ce412eba106d39 wpt-pr: 11291 UltraBlame original commit: 954f7290ff43966a30c2ab2806e6841ab3618059
…s, a=testonly Automatic update from web-platform-testsFetch: test identity encoding for range requests For whatwg/fetch#751. -- wpt-commits: 1421a4a976d4d8263bde4864a1ce412eba106d39 wpt-pr: 11291
…s, a=testonly Automatic update from web-platform-testsFetch: test identity encoding for range requests For whatwg/fetch#751. -- wpt-commits: 1421a4a976d4d8263bde4864a1ce412eba106d39 wpt-pr: 11291
Preview | Diff