Conversation
Together with #1183 this solves the Fetch side of #604. Changes: * No longer set a length for network responses. Callers will have to parse Content-Length themselves. * Make extract set length so requests will set Content-Length correctly. XMLHttpRequest PR: TODO. Tests: web-platform-tests/wpt#27837.
annevk
added a commit
to whatwg/xhr
that referenced
this pull request
Mar 2, 2021
The only information browsers use for progress events for responses is the Content-Length header. Align on that and only use body's length concept for uploads. Tests: web-platform-tests/wpt#27837. Fetch PRs: whatwg/fetch#1183 & whatwg/fetch#1184.
3 tasks
annevk
added a commit
to whatwg/xhr
that referenced
this pull request
Mar 2, 2021
The only information browsers use for progress events for responses is the Content-Length header. Align on that and only use body's length concept for uploads. Tests: web-platform-tests/wpt#27837. Fetch PRs: whatwg/fetch#1183 & whatwg/fetch#1184.
Member
Author
|
This seems ready for review, as well as the tests and the XHR side of things. The idea is that we use body's length concept for uploads and it will be set through extract, and that for downloads we just look at the Content-Length header. This seems to match browsers and makes some amount of sense. |
annevk
added a commit
to whatwg/xhr
that referenced
this pull request
Mar 3, 2021
The only information browsers use for progress events for responses is the Content-Length header. Align on that and only use body's length concept for uploads. Tests: web-platform-tests/wpt#27837. Fetch PRs: whatwg/fetch#1183 & whatwg/fetch#1184.
yutakahirano
approved these changes
Mar 5, 2021
annevk
added a commit
to web-platform-tests/wpt
that referenced
this pull request
Mar 10, 2021
Some tests with progress events, Content-Length, and service workers. For whatwg/fetch#604, whatwg/fetch#1184, and whatwg/xhr#317.
annevk
added a commit
to whatwg/xhr
that referenced
this pull request
Mar 11, 2021
The only information browsers use for progress events for responses is the Content-Length header. Align on that and only use body's length concept for uploads. Tests: web-platform-tests/wpt#27837. Fetch PRs: whatwg/fetch#1183 & whatwg/fetch#1184. Closes whatwg/fetch#604.
moz-v2v-gh
pushed a commit
to mozilla/gecko-dev
that referenced
this pull request
Mar 19, 2021
…testonly Automatic update from web-platform-tests XMLHttpRequest: Content-Length tests Some tests with progress events, Content-Length, and service workers. For whatwg/fetch#604, whatwg/fetch#1184, and whatwg/xhr#317. -- wpt-commits: 0adf967c6d70747d3f77573a7f7f2353d82142c1 wpt-pr: 27837
Bishwarupjee
pushed a commit
to Bishwarupjee/xhr
that referenced
this pull request
Jan 31, 2024
The only information browsers use for progress events for responses is the Content-Length header. Align on that and only use body's length concept for uploads. Tests: web-platform-tests/wpt#27837. Fetch PRs: whatwg/fetch#1183 & whatwg/fetch#1184. Closes whatwg/fetch#604.
jwidar
pushed a commit
to jwidar/LatencyZeroGithub
that referenced
this pull request
Sep 16, 2025
…testonly Automatic update from web-platform-tests XMLHttpRequest: Content-Length tests Some tests with progress events, Content-Length, and service workers. For whatwg/fetch#604, whatwg/fetch#1184, and whatwg/xhr#317. -- wpt-commits: 0adf967c6d70747d3f77573a7f7f2353d82142c1 wpt-pr: 27837
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Together with #1183 this solves the Fetch side of #604. Changes:
XMLHttpRequest PR: whatwg/xhr#317.
Tests: web-platform-tests/wpt#27837.
Preview | Diff