[whatwg/fetch] Define opaque-response blocking (updated) (PR #1755)

This PR is based on what @annevk has proposed in https://github.com/whatwg/fetch/pull/1442, with additional changes. It includes the `validate a partial response` and the `Content-Range header parser` algorithm, plus the additional changes that Firefox has made in its implementation. 

https://github.com/whatwg/fetch/pull/1442 had some discussions and references, and I wish I can keep them, but I don't have write access to annevk/orb, hence this PR. Please let me know if there's a better way to move this forward. 
***

TODO:

- [x] Define "validate a partial response" (and Content-Range header parser)
- [x] "ParseText" vs "create a classic script" + mock data
- [ ] A PR against HTML is needed to ensure it passes the appropriate metadata for media element and classic script requests.
- [x] Double check this operates on the internal response (and if not pass it)
- [x] Also use response in encoding extraction, depends on https://github.com/whatwg/fetch/pull/1447
- [ ] https://github.com/annevk/orb/labels/mvp
***
<!--
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.
When editing this comment after the PR is created, check that PR-Preview doesn't overwrite your changes.
If you think your PR is ready to land, please double-check that the build is passing and the checklist is complete before pinging.
-->

- [x] At least two implementers are interested (and none opposed):
   * Chrome 
   * Firefox
- [x] [Tests](https://github.com/web-platform-tests/wpt) are written and can be reviewed and commented upon at:
   * https://wpt.fyi/results/fetch/orb?label=master&label=experimental&aligned&q=orb
- [ ] [Implementation bugs](https://github.com/whatwg/meta/blob/main/MAINTAINERS.md#handling-pull-requests) are filed:
   * Chromium: …
   * Gecko: …
   * WebKit: …
   * Deno (not for CORS changes): …

- [ ] The top of this comment includes a [clear commit message](https://github.com/whatwg/meta/blob/main/COMMITTING.md) to use. <!-- If you created this PR from a single commit, Github copied its message. Otherwise, you need to add a commit message yourself. -->

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


<!--
    This comment and the below content is programmatically 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/fetch/1755.html" title="Last updated on May 27, 2024, 6:00 PM UTC (e5aeefc)">Preview</a> | <a href="https://whatpr.org/fetch/1755/8d0d207...e5aeefc.html" title="Last updated on May 27, 2024, 6:00 PM UTC (e5aeefc)">Diff</a>
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Define opaque-response blocking
  * Add the `validate a partial response` algorithm and the `extract content-range values` algorithm
  * Update the ORB spec to align with Firefox's implementation

-- File Changes --

    M fetch.bs (443)

-- Patch Links --

https://github.com/whatwg/fetch/pull/1755.patch
https://github.com/whatwg/fetch/pull/1755.diff

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

Message ID: <whatwg/fetch/pull/1755@github.com>

Received on Monday, 27 May 2024 18:01:07 UTC