Skip to content
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

Use extract a length from Fetch #317

Merged
merged 3 commits into from
Mar 11, 2021
Merged

Use extract a length from Fetch #317

merged 3 commits into from
Mar 11, 2021

Conversation

annevk
Copy link
Member

@annevk annevk commented 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.

(See WHATWG Working Mode: Changes for more details.)


Preview | Diff

@annevk annevk force-pushed the annevk/content-length branch from e93c89d to abcc9bd Compare March 2, 2021 16:41
@annevk annevk marked this pull request as ready for review March 2, 2021 16:41
annevk added 2 commits March 3, 2021 17:38
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.
@annevk annevk force-pushed the annevk/content-length branch from abcc9bd to 6c9c4e6 Compare March 3, 2021 16:47
@annevk annevk requested a review from yutakahirano March 3, 2021 16:48
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/fetch that referenced this pull request Mar 10, 2021
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 can set Content-Length correctly.

XMLHttpRequest PR: whatwg/xhr#317.

Tests: web-platform-tests/wpt#27837.
@annevk
Copy link
Member Author

annevk commented Mar 10, 2021

@yutakahirano could you please review this? It will successfully build as soon as the Fetch change is indexed, but the Preview and Diff links are working already so I think reviewing should be possible. Thanks!

xhr.bs Show resolved Hide resolved
xhr.bs Outdated Show resolved Hide resolved
@annevk
Copy link
Member Author

annevk commented Mar 11, 2021

Thanks @yutakahirano, should be good now.

@annevk annevk closed this Mar 11, 2021
@annevk annevk reopened this Mar 11, 2021
@annevk annevk requested a review from yutakahirano March 11, 2021 11:34
@annevk annevk merged commit afd98f1 into main Mar 11, 2021
@annevk annevk deleted the annevk/content-length branch March 11, 2021 12:08
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants