[whatwg/fetch] Define Content-Length parser (#1183)

As the body concept is refactored for #604, XMLHttpRequest will need to use this algorithm for its events. We also want to require browsers to use this algorithm instead of the one defined by HTTP as part of #1156.

Tests: https://github.com/web-platform-tests/wpt/pull/10548 & https://github.com/web-platform-tests/wpt/pull/27837.


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

- [ ] At least two implementers are interested (and none opposed):
   * …
   * …
- [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: …
   * Firefox: …
   * Safari: …

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

@MattMenke2 I haven't attempted to actually require browsers use this yet. I suspect we want some kind of "HTTP monkey patching" section that outlines the various things we want browsers (and clients that emulate them) to implement for that. Ideas welcome, but it's not my main priority here (I'm trying to scope my yak shaving).
You can view, comment on, or merge this pull request online at:

  https://github.com/whatwg/fetch/pull/1183


-- Commit Summary --

  * Define Content-Length parser

-- File Changes --

    M fetch.bs (36)

-- Patch Links --

https://github.com/whatwg/fetch/pull/1183.patch

https://github.com/whatwg/fetch/pull/1183.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/fetch/pull/1183

Received on Monday, 1 March 2021 16:32:52 UTC