diff --git a/fetch.bs b/fetch.bs index bf9966c62..360f24c73 100644 --- a/fetch.bs +++ b/fetch.bs @@ -16,9 +16,9 @@ url:https://tools.ietf.org/html/rfc7230#section-3.2;text:field-content;type:dfn; url:https://tools.ietf.org/html/rfc7230#section-3.2;text:field-value;type:dfn;spec:http url:https://tools.ietf.org/html/rfc7230#section-3.1.2;text:reason-phrase;type:dfn;spec:http url:https://tools.ietf.org/html/rfc7234#section-1.2.1;text:delta-seconds;type:dfn;spec:http-caching -url:https://tools.ietf.org/html/draft-ietf-httpbis-header-structure#section-2;text:structured header value;type:dfn;spec:header-structure -url:https://tools.ietf.org/html/draft-ietf-httpbis-header-structure#section-4.1;text:serializing structured headers;type:dfn;spec:header-structure -url:https://tools.ietf.org/html/draft-ietf-httpbis-header-structure#section-4.2;text:parsing structured headers;type:dfn;spec:header-structure +url:https://tools.ietf.org/html/draft-ietf-httpbis-header-structure#section-2;text:structured field value;type:dfn;spec:header-structure +url:https://tools.ietf.org/html/draft-ietf-httpbis-header-structure#section-4.1;text:serializing structured fields;type:dfn;spec:header-structure +url:https://tools.ietf.org/html/draft-ietf-httpbis-header-structure#section-4.2;text:parsing structured fields;type:dfn;spec:header-structure
@@ -75,9 +75,7 @@ url:https://tools.ietf.org/html/draft-ietf-httpbis-header-structure#section-4.2;
         "title": "HTTP proxy default configurations allow arbitrary TCP connections."
     },
     "EXPECT-CT": {
-        "authors": [
-            "Emily Stark"
-        ],
+        "authors": ["Emily Stark"],
         "href": "https://tools.ietf.org/html/draft-ietf-httpbis-expect-ct-02",
         "publisher": "IETF",
         "title": "Expect-CT Extension for HTTP"
@@ -86,10 +84,10 @@ url:https://tools.ietf.org/html/draft-ietf-httpbis-header-structure#section-4.2;
         "aliasOf": "RFC2560"
     },
     "HEADER-STRUCTURE": {
-        "authors": ["Mark Nottingham","Paul-Henning Kamp"],
+        "authors": ["Mark Nottingham", "Poul-Henning Kamp"],
         "href": "https://tools.ietf.org/html/draft-ietf-httpbis-header-structure",
         "publisher": "IETF",
-        "title": "Structured Headers for HTTP"
+        "title": "Structured Field Values for HTTP"
     }
 }
 
@@ -384,7 +382,7 @@ for consistency. specialized multimap. An ordered list of key-value pairs with potentially duplicate keys.

To -get a structured header +get a structured field value given a name and a type from a header list list, run these steps: @@ -397,28 +395,32 @@ these steps:

  • If value is null, then return null. -

  • Let result be the result of executing the parsing structured headers - algorithm with input_string set to value, and - header_type set to type. +

  • Let result be the result of parsing structured fields with + input_string set to value and header_type set to + type. -

  • If parsing failed, then return failure. +

  • If parsing failed, then return null.

  • Return result. +

    Get a structured field value intentionally does not distinguish between a +header not being present and its value failing to parse as a +structured field value. This ensures uniform processing across the web platform. +

    To -set a structured header -name/structured header value name/structuredValue +set a structured field value +name/structured field value name/structuredValue pair in a header list list, run these steps:

    1. Let serializedValue be the result of executing the - serializing structured headers algorithm on structuredValue. + serializing structured fields algorithm on structuredValue.

    2. Set name/serializedValue in list.

    -

    Structured header values are defined as objects which HTTP can (eventually) +

    Structured field values are defined as objects which HTTP can (eventually) serialize in interesting and efficient ways. For the moment, Fetch only supports header values as byte sequences, which means that these objects can be set in header lists only via serialization, and they can be obtained from