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

Have "Handle Fetch" return error when request's streaming body is unusable #1563

Merged
merged 12 commits into from
Feb 18, 2021
9 changes: 6 additions & 3 deletions docs/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -3048,9 +3048,12 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe

1. Wait for |task| to have executed or for |handleFetchFailed| to be true.
1. If |shouldSoftUpdate| is true, then [=in parallel=] run the [=Soft Update=] algorithm with |registration|.
1. If |requestBody| is not null and |requestBody|'s [=Body/stream=] is [=Body/disturbed=] or [=Body/locked=], then:
1. If |requestBody|'s [=Body/source=] is null, then return a [=network error=] and null.
1. Set |requestBody| to the first component of the result of [=bodyinit/safely-extract|safely extracting=] |requestBody|'s [=Body/source=].
1. If |response| is null and |requestBody| is not null, then:
1. If |requestBody|'s [=Body/source=] is null, then:
1. If |requestBody|'s [=Body/stream=] is [=Body/disturbed=] or [=Body/locked=], then return a [=network error=] and null.
1. Set |requestBody| to the result of [=ReadableStream/create a proxy|creating a proxy=] for |requestBody|'s [=Body/stream=].
1. Else:
1. Set |requestBody| to the first component of the result of [=bodyinit/safely-extract|safely extracting=] |requestBody|'s [=Body/source=].
1. If |respondWithEntered| is false, then:
1. If |eventCanceled| is true, then:
1. If |eventHandled| is not null, then [=reject=] |eventHandled| with a "{{NetworkError}}" {{DOMException}} in |workerRealm|.
Expand Down