diff --git a/fetch.bs b/fetch.bs index 5ac06793e..47d35a91a 100644 --- a/fetch.bs +++ b/fetch.bs @@ -4199,9 +4199,7 @@ steps:
If aborted, then:
Let aborted be the termination's aborted flag. - -
If aborted is set, then return an aborted network error. +
If the termination's aborted flag is set, then return an aborted network error.
Return a network error.
If aborted, then:
Let aborted be the termination's aborted flag. - -
If aborted is set, then return an aborted network error. +
If the termination's aborted flag is set, then return an aborted network error.
Return a network error.
If the ongoing fetch is terminated, then:
Let aborted be the termination's aborted flag. - -
If aborted is set, then return an aborted network error. +
If the termination's aborted flag is set, then return an aborted network error.
Return a network error.
If the ongoing fetch is terminated, then:
Let aborted be the termination's aborted flag. - -
If aborted is set, then return an aborted network error. +
If the termination's aborted flag is set, then return an aborted network error.
Return a network error.
If the ongoing fetch is terminated, then:
Let aborted be the termination's aborted flag. - -
If aborted is set, then return an aborted network error. +
If the termination's aborted flag is set, then return an aborted network error.
Return a network error.
If aborted, then:
Let aborted be the termination's aborted flag. -
If connection uses HTTP/2, then transmit an RST_STREAM
frame.
-
If aborted is set, then return an aborted network error. +
If the termination's aborted flag is set, then return an aborted network error.
Return a network error.
If aborted, then:
Let aborted be the termination's aborted flag. - -
If aborted is set, then set response's +
If the termination's aborted flag is set, then set response's aborted flag.
Return response. @@ -5423,20 +5409,28 @@ optional boolean forceNewConnection (default false), run these steps:
If bytes is failure, then terminate the ongoing fetch. -
Enqueue a {{Uint8Array}} wrapping an {{ArrayBuffer}} - containing bytes into stream. +
Let handleResponseBytes be these steps: -
If stream is errored, then - terminate the ongoing fetch. +
Enqueue a {{Uint8Array}} wrapping an {{ArrayBuffer}} + containing bytes into stream. -
If stream doesn't need more data ask the user - agent to suspend the ongoing fetch. +
If stream is errored, then + terminate the ongoing fetch. + +
If stream doesn't need more data ask the user + agent to suspend the ongoing fetch. +
Otherwise, if the bytes transmission for response's message body is done + normally and stream is readable, then + close stream, finalize response for + fetchParams and response.
Otherwise, if the bytes transmission for response's message body is done - normally and stream is readable, then - close stream, finalize response for - fetchParams and response, and abort these in-parallel steps. +
Queue a fetch task given handleResponseBytes and + fetchParams's task destination. @@ -5446,22 +5440,6 @@ optional boolean forceNewConnection (default false), run these steps:
Let aborted be the termination's aborted flag. - -
If aborted is set, then: - -
Set response's aborted flag. - -
If stream is readable,
- error stream with an
- "AbortError
" {{DOMException}}.
-
Otherwise, if stream is readable, - error stream with a {{TypeError}}. -
If connection uses HTTP/2, then transmit an RST_STREAM
frame.
For instance, the user agent could keep the connection open if it knows there's only a few bytes of transfer remaining on a reusable connection. In this case it could be worse to close the connection and go through the handshake process again for the next fetch. + +
Let handleResponseError be these steps: + +
If the termination's aborted flag is set, then: + +
Set response's aborted flag. + +
If stream is readable,
+ error stream with an
+ "AbortError
" {{DOMException}}.
+
Otherwise, if stream is readable, + error stream with a {{TypeError}}. +
Queue a fetch task given handleResponseError and + fetchParams's task destination.