From 3d9655c4024e67fe4e20e8812e96e8ffa2b3cc0d Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Sat, 17 Jan 2015 10:24:16 +0100 Subject: [PATCH] Disallow body when method is GET or HEAD for now https://www.w3.org/Bugs/Public/show_bug.cgi?id=27846 See also discussion in https://github.com/github/fetch/pull/72 --- Overview.html | 1916 +++++++++++++++++++++++---------------------- Overview.src.html | 4 + 2 files changed, 964 insertions(+), 956 deletions(-) diff --git a/Overview.html b/Overview.html index 710825c80..1f95adfdd 100755 --- a/Overview.html +++ b/Overview.html @@ -1,13 +1,13 @@ Fetch Standard - - + +
-

+

Fetch

-

Living Standard — Last Updated 12 December 2014

+

Living Standard — Last Updated 17 January 2015

Participate: @@ -155,7 +155,7 @@

2 Infrastructure

another byte sequence does so in a byte case-insensitive manner.

The -case-insensitive byte sequences +case-insensitive byte sequences `Content-Type` and `content-TYPE` are equal.

To byte lowercase a byte sequence, increase each byte it contains, in the @@ -166,119 +166,119 @@

2 Infrastructure


-

To queue a fetch task on request +

To queue a fetch task on request request to run an operation, queue a task to run an operation on -request's client's +request's client's responsible event loop using the networking task source.

2.1 HTTP

-

While fetching encompasses more than just HTTP, it +

While fetching encompasses more than just HTTP, it borrows a number of concepts from HTTP and applies these to resources obtained via other means (e.g. data URLs).

2.1.1 Methods

-

A method is a byte sequence that matches the +

A method is a byte sequence that matches the Method token production. -

A simple method is a method that is +

A simple method is a method that is `GET`, `HEAD`, or `POST`. -

A forbidden method is a method that is a +

A forbidden method is a method that is a byte case-insensitive match for one of `CONNECT`, `TRACE`, and `TRACK`. [HTTPVERBSEC] -

To normalize a -method, if it is a byte case-insensitive +

To normalize a +method, if it is a byte case-insensitive match for `DELETE`, `GET`, `HEAD`, `OPTIONS`, `POST`, or `PUT`, byte uppercase it. -

Normalization is +

Normalization is done for backwards compatibility and consistency across APIs as -methods are actually "case-sensitive". +methods are actually "case-sensitive".

2.1.2 Headers

-

A header list consists of zero or more -headers. +

A header list consists of zero or more +headers. -

To append a -name/value +

To append a +name/value (name/value) pair to a -header list (list), append a new -header whose name -is name, byte lowercased, and -value is value, to +header list (list), append a new +header whose name +is name, byte lowercased, and +value is value, to list. -

To delete a -name (name) from a -header list (list), remove all -headers whose -name is name, -byte lowercased, from list. +

To delete a +name (name) from a +header list (list), remove all +headers whose +name is name, +byte lowercased, from list. -

To set a -name/value +

To set a +name/value (name/value) pair in a -header list (list), run these +header list (list), run these steps:

  1. Byte lowercase name. -

  2. If there are any headers in - list whose name is - name, set the value of the first - such header to value and remove the +

  3. If there are any headers in + list whose name is + name, set the value of the first + such header to value and remove the others. -

  4. Otherwise, append a new header whose - name is name and - value is value, to +

  5. Otherwise, append a new header whose + name is name and + value is value, to list.

-

To combine a -name/value +

To combine a +name/value (name/value) pair in a -header list (list), run these +header list (list), run these steps:

  1. Byte lowercase name. -

  2. If there are any headers in - list whose name is - name, set the value of the first - such header to - value, followed by 0x2C 0x20, followed by value. +

  3. If there are any headers in + list whose name is + name, set the value of the first + such header to + value, followed by 0x2C 0x20, followed by value. -

  4. Otherwise, append a new header whose - name is name and - value is value, to +

  5. Otherwise, append a new header whose + name is name and + value is value, to list.

-

Combine solely +

Combine solely exists for XMLHttpRequest.


-

A header consists of a -name and value. -A name is a +

A header consists of a +name and value. +A name is a case-insensitive byte sequence that matches the field-name token production. A -value is a byte sequence that matches the +value is a byte sequence that matches the field-value token production and contains no 0x0A or 0x0D bytes. @@ -286,20 +286,20 @@

2.1.2 Headers


-

A simple header is a header whose -name is either one of `Accept`, +

A simple header is a header whose +name is either one of `Accept`, `Accept-Language`, and `Content-Language`, or whose -name is `Content-Type` and -value, -once parsed, has a MIME type (ignoring parameters) +name is `Content-Type` and +value, +once parsed, has a MIME type (ignoring parameters) that is one of `application/x-www-form-urlencoded`, `multipart/form-data`, and `text/plain`. -

A forbidden header name is a header -name that either is one of +

A forbidden header name is a header +name that either is one of