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

XMLHttpRequest: response stream errors #27778

Merged
merged 2 commits into from Mar 2, 2021
Merged

Conversation

annevk
Copy link
Member

@annevk annevk commented Feb 25, 2021

For whatwg/xhr#314.

It seems Chrome does not throw exceptions here at all...

@yutakahirano
Copy link
Contributor

https://crbug.com/602051 Service worker doesn't intercept sync XHR requests.

cc: @domfarolino

We can write a test with https://github.com/web-platform-tests/wpt/blob/master/fetch/api/resources/bad-chunk-encoding.py alternatively.

Copy link
Contributor

@yutakahirano yutakahirano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@annevk
Copy link
Member Author

annevk commented Feb 26, 2021

@yutakahirano thanks for identifying that! I was wondering if there were non-ReadableStream ways to trigger this condition. That will make testing less cumbersome going forward and also reduces my worry about this being not handled well across callers (although most specification callers of fetch do not seem to account for it at the moment).

@wpt-pr-bot wpt-pr-bot added the xhr label Feb 26, 2021
annevk added a commit to whatwg/xhr that referenced this pull request Feb 26, 2021
And also clean up the way we manage XMLHttpRequest's response, which allows for simplifying "handle response end-of-body" and "handle errors".

Tests: web-platform-tests/wpt#27778.

Fixes #314.
@annevk annevk merged commit 57ceb7e into master Mar 2, 2021
@annevk annevk deleted the annevk/sync-xhr-stream-errors branch March 2, 2021 09:09
annevk added a commit to whatwg/xhr that referenced this pull request Mar 3, 2021
And also clean up the way we manage XMLHttpRequest's response, which allows for simplifying "handle response end-of-body" and "handle errors". (Also ends up removing the remaining dependency on Streams.)

Tests: web-platform-tests/wpt#27778.

Fixes #314.
Bishwarupjee pushed a commit to Bishwarupjee/xhr that referenced this pull request Jan 31, 2024
And also clean up the way we manage XMLHttpRequest's response, which allows for simplifying "handle response end-of-body" and "handle errors". (Also ends up removing the remaining dependency on Streams.)

Tests: web-platform-tests/wpt#27778.

Fixes #314.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants