diff --git a/fetch.bs b/fetch.bs index bf9966c62..9057e3894 100644 --- a/fetch.bs +++ b/fetch.bs @@ -94,12 +94,6 @@ url:https://tools.ietf.org/html/draft-ietf-httpbis-header-structure#section-4.2; } - -
-spec:infra; type:dfn; text:string -spec:streams; type:interface; text:ReadableStream --
A status is a code. -
A null body status is a status that is 101
,
-204
, 205
, or 304
.
+
A null body status is a status that is 101, 204, 205, or 304. -
An ok status is any status in the range 200
to
-299
, inclusive.
+
An ok status is any status in the range 200 to 299, inclusive. -
A redirect status is a status that is 301
,
-302
, 303
, 307
, or 308
.
+
A redirect status is a status that is 301, 302, 303, 307, or 308.
A response has an associated
-status, which is a
-status. Unless stated otherwise it is 200
.
+status, which is a status.
+Unless stated otherwise it is 200.
A response has an associated
status message. Unless stated
@@ -1912,9 +1903,8 @@ known as an aborted network error
type is " A network error is a
-response whose
-status is always A network error is a response whose
+status is always 0,
status message is always the empty byte sequence,
header list is always empty, and
body is always null.
@@ -1960,7 +1950,7 @@ which is only "accessible" to internal specification algorithms and is never a
filtered response whose
type is " In case a server does not wish to participate in the CORS protocol, its HTTP response to
the CORS or CORS-preflight request must not include any of the above
-headers. The server is encouraged to use the error
" is known as a
network error.
-0
,
+opaque
",
URL list is the empty list,
-status is 0
,
+status is 0,
status message is the empty byte sequence,
header list is empty, and
body is null.
@@ -1969,7 +1959,7 @@ which is only "accessible" to internal specification algorithms and is never a
opaque-redirect filtered response
is a filtered response whose
type is "opaqueredirect
",
-status is 0
,
+status is 0,
status message is the empty byte sequence,
header list is empty, and
body is null.
@@ -2456,7 +2446,7 @@ from a {{ReadableStream}} object with reader, run these steps:
OPTIONS
` as
403
status in
-such HTTP responses.
+headers. The server is encouraged to use the 403 status in such HTTP
+responses.
HTTP new-header syntax
@@ -3186,8 +3176,8 @@ run these steps:
If mimeType is failure, then return allowed. -
If response's status is 206
and
- mimeType is a CORB-protected MIME type, then return blocked.
+
If response's status is 206 and mimeType is a + CORB-protected MIME type, then return blocked.
If determine nosniff with response's header list is true @@ -3196,8 +3186,8 @@ run these steps:
CORB only protects text/plain
responses with a
`X-Content-Type-Options: nosniff
` header. Unfortunately, protecting such responses
- without that header when their status is 206
would break too many
- existing video responses that have a text/plain
MIME type.
+ without that header when their status is 206 would break too many existing
+ video responses that have a text/plain
MIME type.
@@ -3785,11 +3775,10 @@ optionally with a recursive flag, run these steps:
If response's type is "opaque
",
- internalResponse's status is 206
,
- internalResponse's range-requested flag is set, and
- request's header list does not contain
- `Range
`, then set response and internalResponse to a
- network error.
+ internalResponse's status is 206, internalResponse's
+ range-requested flag is set, and request's
+ header list does not contain `Range
`,
+ then set response and internalResponse to a network error.
Traditionally, APIs accept a ranged response even if a range was not requested. This prevents @@ -4122,8 +4111,8 @@ optional CORS-preflight flag, run these steps: network error.
As the CORS check is not to be applied to
- responses whose status is 304
or 407
,
- or responses from a service worker for that matter, it is applied here.
+ responses whose status is 304 or 407, or responses
+ from a service worker for that matter, it is applied here.
If the TAO check for request and response returns failure, then set request's timing allow failed flag. @@ -4146,11 +4135,11 @@ optional CORS-preflight flag, run these steps:
If actualResponse's status is not 303
,
- request's body is not null, and the connection uses HTTP/2,
- then user agents may, and are even encouraged to, transmit an RST_STREAM
frame.
+
If actualResponse's status is not 303, request's
+ body is not null, and the connection uses HTTP/2, then user agents
+ may, and are even encouraged to, transmit an RST_STREAM
frame.
-
303
is excluded as certain communities ascribe special status to it.
+
303 is excluded as certain communities ascribe special status to it.
Let location be the result of extracting header list values given
`Location
` and actualResponse's header list.
@@ -4234,9 +4223,9 @@ optional CORS-preflight flag, run these steps:
This catches a cross-origin resource redirecting to a same-origin URL. -
If actualResponse's status is not 303
,
- request's body is non-null, and request's
- body's source is null, then return a network error.
+
If actualResponse's status is not 303, request's + body is non-null, and request's body's + source is null, then return a network error.
If actualResponse's location URL's origin is not same origin with request's current URL's @@ -4248,10 +4237,10 @@ optional CORS-preflight flag, run these steps:
If one of the following is true
actualResponse's status is 301
or
- 302
and request's method is `POST
`
-
actualResponse's status is 303
and
- request's method is not `GET
` or `HEAD
`
+
actualResponse's status is 301 or 302 and
+ request's method is `POST
`
+
actualResponse's status is 303 and request's
+ method is not `GET
` or `HEAD
`
then: @@ -4663,14 +4652,14 @@ Range Requests. [[HTTP-RANGE]] However, this is not widely supported by b
If httpRequest's method is
unsafe and
- forwardResponse's status is in the range 200
to
- 399
, inclusive, invalidate appropriate stored responses in httpCache, as
- per the "Invalidation" chapter of
+ forwardResponse's status is in the range 200 to 399, inclusive,
+ invalidate appropriate stored responses in httpCache, as per the
+ "Invalidation" chapter of
HTTP Caching, and set storedResponse to null. [[!HTTP-CACHING]]
If the revalidatingFlag is set and forwardResponse's
- status is 304
, then:
+ status is 304, then:
Range
`, then set response's range-requested flag.
If response's status is 401
,
- httpRequest's response tainting is not "cors
", the
- credentials flag is set, and request's window is an
- environment settings object, then:
+
If response's status is 401, httpRequest's
+ response tainting is not "cors
", the credentials flag is
+ set, and request's window is an environment settings object,
+ then:
Needs testing: multiple `WWW-Authenticate
` headers, missing,
@@ -4762,7 +4751,7 @@ Range Requests. [[HTTP-RANGE]] However, this is not widely supported by b
If response's status is 407
, then:
+
If response's status is 407, then:
If request's window is @@ -4857,12 +4846,11 @@ Range Requests. [[HTTP-RANGE]] However, this is not widely supported by b
Wait until all the headers are transmitted.
Any responses whose
- status is in the range 100
to
- 199
, inclusive, and is not 101
, are to be ignored.
+
Any responses whose status is in the range 100 to 199, + inclusive, and is not 101, are to be ignored. -
These kind of responses are - eventually followed by a "final" response. +
These kind of responses are eventually followed by a + "final" response.
The exact layering between Fetch and HTTP still needs to be sorted through and @@ -5530,9 +5518,8 @@ objects. remove privileged no-CORS request headers from headers.
To fill a -{{Headers}} object (headers) with a given object (object), -run these steps: +
To fill a {{Headers}} object +headers with a given object object, run these steps:
This is called when headers are modified by unprivileged code.
The
-Headers(init)
-constructor, when invoked, must run these steps:
+new Headers(init)
+constructor steps are:
Let headers be a new {{Headers}} object whose
- guard is "none
".
-
-
If init is given, then fill headers with - init. +
Return headers. +
The append(name, value)
-method, when invoked, must append name/value to the
-context object.
+method steps are to append name/value to this.
-
The delete(name)
-method, when invoked, must run these steps:
+
The delete(name)
method steps are:
If the context object's guard is "immutable
", then
- throw a {{TypeError}}.
+
If this's guard is "immutable
", then throw a
+ {{TypeError}}.
-
Otherwise, if the context object's guard is "request
"
- and name is a forbidden header name, return.
+
Otherwise, if this's guard is "request
" and
+ name is a forbidden header name, return.
-
Otherwise, if the context object's guard is
- "request-no-cors
", name is not a
- no-CORS-safelisted request-header name, and name is not a
- privileged no-CORS request-header name, return.
+
Otherwise, if this's guard is "request-no-cors
",
+ name is not a no-CORS-safelisted request-header name, and name is not
+ a privileged no-CORS request-header name, return.
-
Otherwise, if the context object's guard is
- "response
" and name is a forbidden response-header name, return.
+
Otherwise, if this's guard is "response
" and
+ name is a forbidden response-header name, return.
-
If the context object's header list does not - contain name, then return. +
If this's header list does not contain + name, then return. -
Delete name from the context object's +
Delete name from this's header list. -
If the context object's guard is "request-no-cors
",
- then remove privileged no-CORS request headers from the context object.
+
If this's guard is "request-no-cors
", then
+ remove privileged no-CORS request headers from this.
The get(name)
method, when
-invoked, must run these steps:
+
The get(name)
method steps are:
Return the result of getting name from the - context object's header list. +
Return the result of getting name from this's + header list.
The has(name)
method,
-when invoked, must run these steps:
+
The has(name)
method steps are:
Return true if the context object's header list - contains name, and false otherwise. +
Return true if this's header list + contains name; otherwise false.
The
-set(name, value)
-method, when invoked, must run these steps:
+
The set(name, value)
+method steps are:
Normalize value. @@ -5646,29 +5623,27 @@ method, when invoked, must run these steps:
If name is not a name or value is not a value, then throw a {{TypeError}}. -
If the context object's guard is "immutable
", then
- throw a {{TypeError}}.
+
If this's guard is "immutable
", then throw a
+ {{TypeError}}.
-
Otherwise, if the context object's guard is "request
"
- and name is a forbidden header name, return.
+
Otherwise, if this's guard is "request
" and
+ name is a forbidden header name, return.
-
Otherwise, if the context object's guard is
- "request-no-cors
" and name/value is not a
- no-CORS-safelisted request-header, return.
+
Otherwise, if this's guard is "request-no-cors
" and
+ name/value is not a no-CORS-safelisted request-header, return.
-
Otherwise, if the context object's guard is
- "response
" and name is a forbidden response-header name, return.
+
Otherwise, if this's guard is "response
" and
+ name is a forbidden response-header name, return.
-
Set name/value in the context object's +
Set name/value in this's header list. -
If the context object's guard is "request-no-cors
",
- then remove privileged no-CORS request headers from the context object.
+
If this's guard is "request-no-cors
", then
+ remove privileged no-CORS request headers from this.
The value pairs to iterate over are the return value of running -sort and combine with the context object's -header list. +sort and combine with this's header list.
An object implementing the {{Body}} mixin is said to be -disturbed if body is -non-null and its stream is +disturbed if its body is +non-null and its body's stream is disturbed.
An object implementing the {{Body}} mixin is said to be -locked if body is -non-null and its stream is -locked. +locked if its body is non-null and +its body's stream is locked. -
The body
attribute's getter must return null if
-body is null and body's stream otherwise.
+
The body
getter steps are to return null if
+this's body is null; otherwise this's body's
+stream.
-
The bodyUsed
attribute's getter must
-return true if disturbed, and false otherwise.
+
The bodyUsed
getter steps are to return true if
+this is disturbed; otherwise false.
-
Objects implementing the {{Body}} mixin also have an associated -package data algorithm, given -bytes, a type and a mimeType, switches on type, and -runs the associated steps: +
The package data algorithm, given +bytes, type, and a mimeType, switches on type, and runs +the associated steps:
Objects implementing the {{Body}} mixin also have an associated -consume body algorithm, given a type, -runs these steps: +
The consume body algorithm, given an +object and type, runs these steps:
If this object is disturbed or locked, return a new promise - rejected with a {{TypeError}}. +
If object is disturbed or locked, then return + a promise rejected with a {{TypeError}}. -
Let stream be body's - stream if body is - non-null, or an empty - {{ReadableStream}} object otherwise. +
Let stream be object's body's stream + if object's body is non-null; otherwise an empty + {{ReadableStream}} object. -
Let reader be the result of getting - a reader from stream. If that threw an exception, return a new promise rejected - with that exception. +
Let reader be the result of + getting a reader from stream. If that threw + an exception, return a promise rejected with that exception.
Let promise be the result of - reading all bytes from - stream with reader. - -
Return the result of transforming promise by a fulfillment handler that - returns the result of the package data algorithm - with its first argument, type and this object's - MIME type. - + reading all bytes from stream with + reader. + +
Let steps be to return the result of package data with the first argument + given, type, and object's MIME type. + +
Return the result of upon fulfillment of promise given steps.
The arrayBuffer()
-method, when invoked, must return the result of running
-consume body with ArrayBuffer.
+
The arrayBuffer()
method steps are to return the result
+of running consume body with this and ArrayBuffer.
-
The blob()
method, when
-invoked, must return the result of running
-consume body with Blob.
+
The blob()
method steps are to return the result of
+running consume body with this and Blob.
-
The formData()
method,
-when invoked, must return the result of running
-consume body with FormData.
+
The formData()
method steps are to return the result of
+running consume body with this and FormData.
-
The json()
method, when
-invoked, must return the result of running
-consume body with JSON.
+
The json()
method steps are to return the result of
+running consume body with this and JSON.
-
The text()
method, when
-invoked, must return the result of running
-consume body with text.
+
The text()
method steps are to return the result of
+running consume body with this and text.
The
-Request(input, init)
-constructor must run these steps:
+new Request(input, init)
+constructor steps are:
Let request be null. @@ -6179,7 +6144,7 @@ constructor must run these steps:
Let fallbackCredentials be null. -
Let baseURL be current settings object's +
Let baseURL be this's relevant settings object's API base URL.
Let signal be null. @@ -6206,16 +6171,18 @@ constructor must run these steps:
Otherwise (input is a {{Request}} object): +
Otherwise:
-Let origin be current settings object's +
Let origin be this's relevant settings object's origin.
Let window be "client
".
@@ -6223,7 +6190,7 @@ constructor must run these steps:
If request's window is an environment settings object and its origin is same origin with - origin, set window to request's + origin, then set window to request's window.
If init["{{RequestInit/window}}"] exists and is non-null, then @@ -6249,7 +6216,7 @@ constructor must run these steps:
If init["{{RequestInit/signal}}"] exists, then set signal to it. -
Let r be a new {{Request}} object associated with request. +
If signal is not null, then make r's signal +
If signal is not null, then make this's signal follow signal. -
Set r's headers to a new {{Headers}} object, whose +
Set this's headers to a new {{Headers}} object, whose
header list is request's header list, and
guard is "request
".
@@ -6425,23 +6392,23 @@ constructor must run these steps:
API.
Let headers be a copy of r's headers and its +
Let headers be a copy of this's headers and its associated header list.
If init["{{RequestInit/headers}}"] exists, then set headers to init["{{RequestInit/headers}}"]. -
Empty r's headers's header list. +
Empty this's headers's header list.
If headers is a Headers
object, then for each
header in its header list, append
header's name/header's value to
- r's {{Headers}} object.
+ this's headers.
-
Otherwise, fill r's {{Headers}} object with +
Otherwise, set body and Content-Type to the result of extracting init["{{RequestInit/body}}"]. -
If Content-Type is non-null and r's headers's +
If Content-Type is non-null and this's headers's
header list does not contain
`Content-Type
`, then append
- `Content-Type
`/Content-Type to r's headers.
+ `Content-Type
`/Content-Type to this's headers.
If body is non-null and body's source is null, then:
If this's request's mode is neither
"same-origin
" nor "cors
", then throw a {{TypeError}}.
-
Set r's request's +
Set this's request's use-CORS-preflight flag.
Set r's MIME type to the result of - extracting a MIME type from r's request's +
Set this's MIME type to the result of + extracting a MIME type from this's request's header list. - -
Return r.
The method
attribute's getter, when invoked, must
-return the context object's request's method.
+
The method
getter steps are to return this's
+request's method.
-
The url
attribute's getter, when invoked, must
-return the context object's request's URL,
-serialized.
+
The url
getter steps are to return this's
+request's URL, serialized.
-
The headers
attribute's getter, when invoked, must
-return the context object's headers.
+
The headers
getter steps are to return
+this's headers.
-
The destination
attribute's getter, when invoked,
-must return the context object's request's destination.
+
The destination
getter are to return this's
+request's destination.
-
The referrer
attribute's getter, when invoked, must
-return the empty string if the context object's request's
-referrer is "no-referrer
", "about:client
" if the
-context object's request's referrer is
-"client
", and the context object's request's
-referrer, serialized, otherwise.
+
The referrer
getter steps are:
-
The referrerPolicy
attribute's getter, when
-invoked, must return the context object's request's
-referrer policy.
+
If this's request's referrer is
+ "no-referrer
", then return the empty string.
-
The mode
attribute's getter, when invoked, must
-return the context object's request's mode.
+
If this's request's referrer is
+ "client
", then return "about:client
".
-
The credentials
attribute's getter, when invoked,
-must return the context object's request's
-credentials mode.
+
Return this's request's referrer, + serialized. +
The cache
attribute's getter, when invoked, must
-return the context object's request's cache mode.
+
The referrerPolicy
getter steps are to return
+this's request's referrer policy.
-
The redirect
attribute's getter, when invoked, must
-return the context object's request's redirect mode.
+
The mode
getter steps are to return this's
+request's mode.
-
The integrity
attribute's getter, when invoked,
-must return the context object's request's
-integrity metadata.
+
The credentials
getter steps are to return
+this's request's credentials mode.
-
The keepalive
attribute's getter, when invoked,
-must return true if the context object's request's keepalive flag
-is set, and false otherwise.
+
The cache
getter steps are to return this's
+request's cache mode.
-
The isReloadNavigation
attribute's getter, when
-invoked, must return true if the context object's request's
-reload-navigation flag is set, and false otherwise.
+
The redirect
getter steps are to return
+this's request's redirect mode.
-
The isHistoryNavigation
attribute's getter, when
-invoked, must return true if the context object's request's
-history-navigation flag is set, and false otherwise.
+
The integrity
getter steps are to return
+this's request's integrity metadata.
-
The signal
attribute's getter, when invoked, must
-return the context object's signal.
+
The keepalive
getter steps are to return true if
+this's request's keepalive flag is set; otherwise false.
+
+
The isReloadNavigation
getter steps are to return
+true if this's request's reload-navigation flag is set;
+otherwise false.
+
+
The isHistoryNavigation
getter steps are to return
+true if this's request's history-navigation flag is
+set; otherwise false.
+
+
The signal
getter steps are to return this's
+signal.
The clone()
method, when invoked, must
-run these steps:
+
The clone()
method steps are:
If the context object is disturbed or locked, then - throw a {{TypeError}}. +
If this is disturbed or locked, then throw a + {{TypeError}}.
Let clonedRequestObject be a new {{Request}} object. -
Let clonedRequest be the result of cloning the - context object's request. +
Let clonedRequest be the result of cloning + this's request.
Set clonedRequestObject's request to clonedRequest. @@ -6614,12 +6579,12 @@ run these steps:
Make clonedRequestObject's signal - follow the context object's signal. + follow this's signal.
Return clonedRequestObject.
The
-Response(body, init)
-constructor, when invoked, must run these steps:
+new Response(body, init)
+constructor steps are:
If init["{{ResponseInit/status}}"] is not in the range 200
to
- 599
, inclusive, then throw a RangeError
.
+
If init["{{ResponseInit/status}}"] is not in the range 200 to 599, inclusive, + then throw a {{RangeError}}.
If init["{{ResponseInit/statusText}}"] does not match the reason-phrase token production, then throw a {{TypeError}}. -
Let r be a new {{Response}} object associated with a new response. +
Set r's headers to a new {{Headers}} object, whose +
Set this's headers to a new {{Headers}} object, whose
header list is r's response's
header list, and guard is "response
".
-
Set this's response's status to init["{{ResponseInit/status}}"]. -
Set r's response's status message to +
Set this's response's status message to init["{{ResponseInit/statusText}}"].
If init["{{ResponseInit/headers}}"] exists, then - fill r's headers with + fill this's headers with init["{{ResponseInit/headers}}"].
If init["{{ResponseInit/status}}"] is a null body status, then throw a {{TypeError}}. -
101
is included in
- null body status due to its use elsewhere. It does not affect this step.
+
101 is included in null body status due to its use elsewhere. + It does not affect this step.
Let Content-Type be null. -
Set this's response's body and Content-Type to the result of extracting body. -
If Content-Type is non-null and r's response's +
If Content-Type is non-null and this's response's
header list does not contain
`Content-Type
`, then append
- `Content-Type
`/Content-Type to r's
+ `Content-Type
`/Content-Type to this's
response's header list.
Set r's MIME type to the result of - extracting a MIME type from r's response's +
Set this's MIME type to the result of + extracting a MIME type from this's response's header list. -
Set r's response's - HTTPS state to - current settings object's +
Set this's response's HTTPS state to + this's relevant settings object's HTTPS state. - -
Return r. -
The static error()
method, when invoked, must run
-these steps:
+
The static error()
method steps are:
Let r be a new {{Response}} object, whose response is a new @@ -6742,8 +6703,8 @@ these steps:
The static
-redirect(url, status)
-method, when invoked, must run these steps:
+redirect(url, status)
method steps
+are:
Let parsedURL be the result of @@ -6753,8 +6714,7 @@ method, when invoked, must run these steps:
If parsedURL is failure, then throw a {{TypeError}}. -
If status is not a redirect status, then throw a
- RangeError
.
+
If status is not a redirect status, then throw a {{RangeError}}.
Let r be a new {{Response}} object, whose response is a new response. @@ -6765,64 +6725,63 @@ method, when invoked, must run these steps:
Append `Location
` to parsedURL,
- serialized and isomorphic encoded, in r's
+
Let value be parsedURL, serialized and + isomorphic encoded. + +
Append `Location
`/value to r's
response's header list.
Return r.
The type
attribute's getter, when invoked, must
-return the context object's response's type.
+
The type
getter steps are to return this's
+response's type.
-
The url
attribute's getter, when invoked, must
-return the empty string if the context object's response's
-URL is null and the context object's response's
-URL, serialized with the exclude-fragment flag
-set, otherwise. [[!URL]]
+
The url
getter steps are to return
+the empty string if this's response's URL is null;
+otherwise this's response's URL,
+serialized with the exclude-fragment flag set. [[!URL]]
-
The redirected
attribute's getter, when invoked,
-must return true if the context object's response's
-URL list has more than one item, and false otherwise.
+
The redirected
getter steps are to return true if
+this's response's URL list has more than one item;
+otherwise false.
To filter out responses that are the result of a
redirect, do this directly through the API, e.g., fetch(url, { redirect:"error" })
.
This way a potentially unsafe response cannot accidentally leak.
-
The status
attribute's getter, when invoked, must
-return the context object's response's status.
+
The status
getter steps are to return
+this's response's status.
-
The ok
attribute's getter, when invoked, must
-return true if the context object's response's status
-is an ok status, and false otherwise.
+
The ok
getter steps are to return true if
+this's response's status is an ok status;
+otherwise false.
-
The statusText
attribute's getter, when invoked,
-must return the context object's response's
-status message.
+
The statusText
getter steps are to return
+this's response's status message.
-
The headers
attribute's getter, when invoked, must
-return the context object's headers.
+
The headers
getter steps are to return
+this's headers.
The clone()
method, when invoked, must
-run these steps:
+
The clone()
method steps are:
If the context object is disturbed or locked, then - throw a {{TypeError}}. +
If this is disturbed or locked, then throw a + {{TypeError}}.
Let clonedResponseObject be a new {{Response}} object. -
Let clonedResponse be the result of cloning the - context object's response. +
Let clonedResponse be the result of cloning + this's response.
Set clonedResponseObject's response to clonedResponse.
Set clonedResponseObject's headers to a new {{Headers}} object whose header list is set to clonedResponse's - header list, and guard is the context object's + header list, and guard is this's headers's guard.
Return clonedResponseObject. @@ -6841,14 +6800,14 @@ partial interface mixin WindowOrWorkerGlobalScope {
The
fetch(input, init)
-method, must run these steps:
+method steps are:
Let p be a new promise.
Let requestObject be the result of invoking the initial value of {{Request}} as constructor with input and init as arguments. If this throws an exception, - reject p with it and return p. + reject p with it and return p.
Let request be requestObject's request. @@ -6903,12 +6862,12 @@ method, must run these steps: with p, request, and responseObject, and terminate these substeps. -
If response is a network error, then reject p with a - {{TypeError}} and terminate these substeps. +
If response is a network error, then reject p + with a {{TypeError}} and terminate these substeps.
Associate responseObject with response. -
Resolve p with responseObject. +
Resolve p with responseObject.
Return p. @@ -6921,7 +6880,7 @@ method, must run these steps:
Let error be an "AbortError
" {{DOMException}}.
Reject promise with error. +
Reject promise with error.
This is a no-op if promise has already fulfilled. @@ -7112,9 +7071,8 @@ therefore not shareable, a WebSocket connection is very close to identical to an
Let response be the result of fetching request. -
If response is a network error or its
- status is not 101
,
- fail the WebSocket connection.
+
If response is a network error or its status is not + 101, fail the WebSocket connection.
If protocols is not the empty list and extracting header list values given