diff --git a/Overview.html b/Overview.html index 76431f9..f5f93da 100644 --- a/Overview.html +++ b/Overview.html @@ -7,7 +7,7 @@
o
Empty author request headers.
Set response to a
network error.
+
Set received bytes to the empty byte sequence.
Set response ArrayBuffer
object to null.
Set response Blob
object to null.
Set response Document
object to null.
@@ -974,7 +975,7 @@
4.5.6 The s
loadstart
on the
XMLHttpRequestUpload
object with 0 and req's
body's
- length.
+ total bytes.
-
Fetch req.
@@ -1014,10 +1015,10 @@
4.5.6 The s
progress
on the
XMLHttpRequestUpload
object with request's
body's
- transmitted and
+ transmitted bytes and
request's
body's
- length.
+ total bytes.
@@ -1029,11 +1030,11 @@ 4.5.6 The s
Let transmitted be request's
body's
- transmitted.
+ transmitted bytes.
Let length be request's
body's
- length.
+ total bytes.
Fire a progress event named
progress
on the
@@ -1070,38 +1071,58 @@
4.5.6 The s
Set state to
headers received.
-
Fire an event named readystatechange
.
-
+
Fire an event named
+ readystatechange
.
-
To process response body for
- response, run these subsubsteps:
+
If state is not
+ headers received, then return.
-
- If not roughly 50ms have passed since these subsubsteps were last invoked,
- terminate these subsubsteps.
+
If response's
+ body is null,
+ then run handle response end-of-file and return.
-
Handle errors for response.
+
-
+
Let reader be the result of
+ getting a reader from
+ response's body's
+ stream.
-
If response is a
- network error,
- return.
+
This operation will not throw an exception.
-
If state is
- headers received, set
- state to loading and
- fire an event named readystatechange
.
-
-
Fire a progress event named progress
with response's
- body's
- transmitted and
- response's
- body's
- length.
-
+ -
+
Let read be the result of calling
+ ReadFromReadableStreamReader
(reader).
+
+
When read is fulfilled with an object whose done
property is false
+ and whose value
property is a Uint8Array
object, run these
+ subsubsubsteps and then run the above subsubstep again:
+
+
+ Append the value
property to received bytes.
+
+
If not roughly 50ms have passed since these subsubsubsteps were last invoked,
+ then terminate these subsubsubsteps.
+
+
If state is
+ headers received, then set
+ state to loading and
+ fire an event named
+ readystatechange
.
+
+
Fire a progress event named
+ progress
with response's
+ body's
+ transmitted bytes and
+ response's body's
+ total bytes.
+
- To process response end-of-file for
- response, run handle response end-of-file for
- response.
+
When read is fulfilled with an object whose done
property is true,
+ run handle response end-of-file for response.
+
+
When read is rejected with an exception, run handle errors for
+ response.
+
-
@@ -1119,6 +1140,29 @@
4.5.6 The s
timeout
attribute value with reason
timeout.
+ If response's
+ body is null,
+ then run handle response end-of-file and return.
+
+
-
+
Let reader be the result of
+ getting a reader from
+ response's body's
+ stream.
+
+
This operation will not throw an exception.
+
+
Let promise be the result of
+ reading all
+ bytes from response's
+ body's
+ stream with reader.
+
+
Wait for promise to be fulfilled or rejected.
+
+
If promise is fulfilled with bytes, then append bytes
+ to received bytes.
+
Run handle response end-of-file for response.
@@ -1147,11 +1191,11 @@
4.5.6 The s
Let transmitted be response's
body's
- transmitted.
+ transmitted bytes.
Let length be response's
body's
- length.
+ total bytes.
Fire a progress event named progress
with transmitted and length.
@@ -1284,6 +1328,8 @@
4.6 Response
otherwise it is a
network error.
+An XMLHttpRequest
also has an associated received bytes (a byte
+sequence). Unless stated otherwise it is the empty byte sequence.
4.6.1 The responseURL
attribute
@@ -1436,16 +1482,11 @@ 4.6.6 Response body
If response ArrayBuffer
object is non-null, return it.
-
Let bytes be the empty byte sequence, if response's
- body is null, and
- response's
- body otherwise.
-
-
Set response ArrayBuffer
object to a new ArrayBuffer
- object representing bytes. If this throws an exception, set
- response ArrayBuffer
object and response's
- body to null.
+ object representing received bytes. If this throws an exception, then set
+ response ArrayBuffer
object to null and set received bytes
+ to the empty byte sequence.
Allocating an ArrayBuffer
buffer is not guaranteed to succeed.
[ECMASCRIPT]
@@ -1462,13 +1503,8 @@
4.6.6 Response body
Let type be the empty string, if final MIME type is
null, and final MIME type otherwise.
-
Let bytes be the empty byte sequence, if response's
- body is null, and
- response's
- body otherwise.
-
Set response Blob
object to a new
- Blob
object representing bytes with
+ Blob
object representing received bytes with
type
type and
return it.
@@ -1479,10 +1515,8 @@ 4.6.6 Response body
If response Document
object is non-null, return it.
-
If bytes is null, return null.
+
If final MIME type is not null,
text/html
, text/xml
,
@@ -1508,7 +1542,7 @@
4.6.6 Response body
If charset is null,
prescan
- the first 1024 bytes of bytes and if
+ the first 1024 bytes of received bytes and if
that does not terminate unsuccessfully then let charset be
the return value.
@@ -1517,7 +1551,7 @@
4.6.6 Response body
Let document be a
document that
- represents the result parsing bytes following the rules set
+ represents the result parsing received bytes following the rules set
forth in the HTML Standard for an HTML parser with scripting disabled and
a known definite encoding charset.
[HTML]
@@ -1531,8 +1565,8 @@
4.6.6 Response body
document
that represents the result of running the XML parser
with XML scripting support disabled on
- bytes. If that fails (unsupported character encoding,
- namespace well-formedness error, etc.), return null.
+ received bytes. If that fails (unsupported character encoding,
+ namespace well-formedness error, etc.), then return null.
[HTML]
Resources referenced will not be loaded and no associated XSLT will be
@@ -1569,13 +1603,11 @@
4.6.6 Response body
If response JSON object is non-null, return it.
-
If bytes is null, return null.
+
Let JSON text be the result of running
- utf-8 decode on byte stream bytes.
+ utf-8 decode on received bytes.
Let JSON object be the result of invoking the initial value of the
parse
property of the JSON
object, with
@@ -1589,10 +1621,9 @@
4.6.6 Response body
A text response is the return value of these steps:
- If bytes is null, return the empty string.
+
If response's
+ body is null, then return the
+ empty string.
Let charset be the final charset.
@@ -1615,9 +1646,8 @@
4.6.6 Response body
utf-8.
Return the result of running
- decode on byte stream
- bytes using fallback encoding
- charset.
+ decode on received bytes using fallback
+ encoding charset.
Authors are strongly encouraged to always encode their
@@ -2223,6 +2253,8 @@
References
- Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content, Roy Fielding and Julian Reschke. IETF.
+
- Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests, Roy Fielding and Julian Reschke. IETF.
+
- Hypertext Transfer Protocol (HTTP/1.1): Caching, Roy Fielding and Julian Reschke. IETF.
- Hypertext Transfer Protocol (HTTP/1.1): Authentication, Roy Fielding and Julian Reschke. IETF.
@@ -2237,10 +2269,10 @@
References
- Web IDL, Cameron McCormack. W3C.
- [XML]
-
- Extensible Markup Language, Tim Bray, Jean Paoli, C. M. Sperberg-McQueen et al.. W3C.
+
- Extensible Markup Language, Tim Bray, Jean Paoli, C. M. Sperberg-McQueen et al.. W3C.
- [XMLNS]
-
- Namespaces in XML, Tim Bray, Dave Hollander, Andrew Layman et al.. W3C.
+
- Namespaces in XML, Tim Bray, Dave Hollander, Andrew Layman et al.. W3C.
open()
methodEmpty author request headers.
Set response to a network error. +
Set received bytes to the empty byte sequence.
Set response ArrayBuffer
object to null.
Set response Blob
object to null.
Set response Document
object to null.
@@ -926,7 +927,7 @@
send()
methodloadstart
on the
XMLHttpRequestUpload
object with 0 and req's
body's
- length.
+ total bytes.
Fetch req. @@ -966,10 +967,10 @@
send()
methodprogress
on the
XMLHttpRequestUpload
object with request's
body's
- transmitted and
+ transmitted bytes and
request's
body's
- length.
+ total bytes.
@@ -981,11 +982,11 @@ send()
methodLet transmitted be request's body's - transmitted. + transmitted bytes.
Let length be request's body's - length. + total bytes.
Fire a progress event named
progress
on the
@@ -1022,38 +1023,58 @@
send()
methodSet state to headers received. -
Fire an event named readystatechange
.
-
+
Fire an event named
+ readystatechange
.
-
To process response body for - response, run these subsubsteps: +
If state is not + headers received, then return. -
If not roughly 50ms have passed since these subsubsteps were last invoked, - terminate these subsubsteps. +
If response's + body is null, + then run handle response end-of-file and return. -
Handle errors for response. +
Let reader be the result of + getting a reader from + response's body's + stream. -
If response is a - network error, - return. +
This operation will not throw an exception. -
If state is
- headers received, set
- state to loading and
- fire an event named readystatechange
.
-
-
Fire a progress event named progress
with response's
- body's
- transmitted and
- response's
- body's
- length.
-
Let read be the result of calling
+ ReadFromReadableStreamReader
(reader).
+
+
When read is fulfilled with an object whose done
property is false
+ and whose value
property is a Uint8Array
object, run these
+ subsubsubsteps and then run the above subsubstep again:
+
+
Append the value
property to received bytes.
+
+
If not roughly 50ms have passed since these subsubsubsteps were last invoked, + then terminate these subsubsubsteps. + +
If state is
+ headers received, then set
+ state to loading and
+ fire an event named
+ readystatechange
.
+
+
Fire a progress event named
+ progress
with response's
+ body's
+ transmitted bytes and
+ response's body's
+ total bytes.
+
To process response end-of-file for - response, run handle response end-of-file for - response. +
When read is fulfilled with an object whose done
property is true,
+ run handle response end-of-file for response.
+
+
When read is rejected with an exception, run handle errors for + response. +
send()
methodtimeout
attribute value with reason
timeout.
+ If response's + body is null, + then run handle response end-of-file and return. + +
Let reader be the result of + getting a reader from + response's body's + stream. + +
This operation will not throw an exception. + +
Let promise be the result of + reading all + bytes from response's + body's + stream with reader. + +
Wait for promise to be fulfilled or rejected. + +
If promise is fulfilled with bytes, then append bytes + to received bytes. +
Run handle response end-of-file for response. @@ -1099,11 +1143,11 @@
send()
methodLet transmitted be response's body's - transmitted. + transmitted bytes.
Let length be response's body's - length. + total bytes.
Fire a progress event named progress
with transmitted and length.
@@ -1236,6 +1280,8 @@
An XMLHttpRequest
also has an associated received bytes (a byte
+sequence). Unless stated otherwise it is the empty byte sequence.
responseURL
attributeIf response ArrayBuffer
object is non-null, return it.
-
Let bytes be the empty byte sequence, if response's - body is null, and - response's - body otherwise. -
Set response ArrayBuffer
object to a new ArrayBuffer
- object representing bytes. If this throws an exception, set
- response ArrayBuffer
object and response's
- body to null.
+ object representing received bytes. If this throws an exception, then set
+ response ArrayBuffer
object to null and set received bytes
+ to the empty byte sequence.
Allocating an ArrayBuffer
buffer is not guaranteed to succeed.
ECMASCRIPT
@@ -1414,13 +1455,8 @@
Let type be the empty string, if final MIME type is null, and final MIME type otherwise. -
Let bytes be the empty byte sequence, if response's - body is null, and - response's - body otherwise. -
Set response Blob
object to a new
- Blob
object representing bytes with
+ Blob
object representing received bytes with
type
type and
return it.
If response Document
object is non-null, return it.
-
Let bytes be response's - body. - -
If bytes is null, return null. +
If response's + body is null, then return null.
If final MIME type is not null,
text/html
, text/xml
,
@@ -1460,7 +1494,7 @@
If charset is null, prescan - the first 1024 bytes of bytes and if + the first 1024 bytes of received bytes and if that does not terminate unsuccessfully then let charset be the return value. @@ -1469,7 +1503,7 @@
Let document be a document that - represents the result parsing bytes following the rules set + represents the result parsing received bytes following the rules set forth in the HTML Standard for an HTML parser with scripting disabled and a known definite encoding charset. HTML @@ -1483,8 +1517,8 @@
Resources referenced will not be loaded and no associated XSLT will be @@ -1521,13 +1555,11 @@
If response JSON object is non-null, return it. -
Let bytes be response's - body. - -
If bytes is null, return null. +
If response's + body is null, then return null.
Let JSON text be the result of running - utf-8 decode on byte stream bytes. + utf-8 decode on received bytes.
Let JSON object be the result of invoking the initial value of the
parse
property of the JSON
object, with
@@ -1541,10 +1573,9 @@
A text response is the return value of these steps:
Let bytes be response's - body. - -
If bytes is null, return the empty string. +
If response's + body is null, then return the + empty string.
Let charset be the final charset. @@ -1567,9 +1598,8 @@
Return the result of running - decode on byte stream - bytes using fallback encoding - charset. + decode on received bytes using fallback + encoding charset.
Authors are strongly encouraged to always encode their