[whatwg/xhr] Handle errors in response bodies (#315)

And also clean up the way we manage XMLHttpRequest's response, which allows for simplifying "handle response end-of-body" and "handle errors".

Tests: https://github.com/web-platform-tests/wpt/pull/27778.


Fixes #314.

<!--
Thank you for contributing to the XMLHttpRequest Standard! Please describe the change you are making and complete the checklist below if your change is not editorial.
-->

- [x] At least two implementers are interested (and none opposed):
   * Chrome (presumably)
   * Safari (presumably)
- [x] [Tests](https://github.com/web-platform-tests/wpt) are written and can be reviewed and commented upon at:
   * See above.
- [ ] [Implementation bugs](https://github.com/whatwg/meta/blob/main/MAINTAINERS.md#handling-pull-requests) are filed:
   * Chrome: N/A
   * Firefox: …
   * Safari: N/A

(See [WHATWG Working Mode: Changes](https://whatwg.org/working-mode#changes) for more details.)


<!--
    This comment and the below content is programatically generated.
    You may add a comma-separated list of anchors you'd like a
    direct link to below (e.g. #idl-serializers, #idl-sequence):

    Don't remove this comment or modify anything below this line.
    If you don't want a preview generated for this pull request,
    just replace the whole of this comment's content by "no preview"
    and remove what's below.
-->
***
<a href="https://whatpr.org/xhr/315.html" title="Last updated on Feb 26, 2021, 2:16 PM UTC (2a60fc0)">Preview</a> | <a href="https://whatpr.org/xhr/315/26f974f...2a60fc0.html" title="Last updated on Feb 26, 2021, 2:16 PM UTC (2a60fc0)">Diff</a>
You can view, comment on, or merge this pull request online at:

  https://github.com/whatwg/xhr/pull/315


-- Commit Summary --

  * Handle errors in response bodies

-- File Changes --

    M xhr.bs (63)

-- Patch Links --

https://github.com/whatwg/xhr/pull/315.patch

https://github.com/whatwg/xhr/pull/315.diff


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/xhr/pull/315

Received on Friday, 26 February 2021 14:17:09 UTC