From e3978ef440f8c008842398418aaf099241938142 Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Fri, 10 Mar 2017 15:13:52 +0100 Subject: [PATCH] Change combine and combined value to use 0x2C 0x20 Instead of just 0x2C, use 0x2C 0x20 somewhat consistently (except where we can't and point it out) as that is what XMLHttpRequest implementations have always done and nobody likes too much change. Fixes the Fetch part of https://github.com/whatwg/xhr/issues/108 and https://github.com/whatwg/xhr/issues/109. --- fetch.bs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/fetch.bs b/fetch.bs index c482ded93..e139e8c86 100644 --- a/fetch.bs +++ b/fetch.bs @@ -315,20 +315,20 @@ all headers whose name is a byte-case-insensitivevalue is value to list. -

To combine a +

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

  1. If list contains name, then set the value of the first such header to its value, followed - by `,`, followed by value. + by 0x2C 0x20, followed by value.

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

-

Combine is used by {{XMLHttpRequest}} and the +

Combine is used by {{XMLHttpRequest}} and the WebSocket protocol handshake.

To @@ -387,7 +387,7 @@ production as name (name) and header list (list), is the values of all headers in list whose name is a byte-case-insensitive match for name, separated from -each other by `,`, in order. +each other by 0x2C 0x20, in order.


@@ -3792,6 +3792,9 @@ steps: preflight's header list. +

This intentionally does not use combine, as 0x20 following + 0x2C is not the way this was implemented, for better or worse. +

  • Let response be the result of performing an HTTP-network-or-cache fetch using preflight. @@ -5462,10 +5465,9 @@ therefore not shareable, a WebSocket connection is very close to identical to an `Sec-WebSocket-Version`/`13` to request's header list. -

  • For each protocol in protocols, - combine - `Sec-WebSocket-Protocol`/protocol in - request's header list. +

  • For each protocol in protocols, combine + `Sec-WebSocket-Protocol`/protocol in request's + header list.

  • Let permessageDeflate be a user-agent defined