-
Notifications
You must be signed in to change notification settings - Fork 351
Specify identity encoding for range requests. Fixes #747. #751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
fetch.bs
Outdated
<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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You cannot have a newline before <a
here. We only allow whitespace at the end of paragraphs.
fetch.bs
Outdated
@@ -3661,7 +3671,7 @@ Range Requests</cite>. [[HTTP-RANGE]] However, this is not widely supported by b | |||
`<code>Connection</code>`, | |||
`<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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
fetch.bs
Outdated
<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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
Chrome: https://bugs.chromium.org/p/chromium/issues/detail?id=849952 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). Edge: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/17784386/ |
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
Preview | Diff