From 34f586dae28d4678518b4d07b29deec227815f26 Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Thu, 12 Jan 2017 09:40:25 +0100 Subject: [PATCH] Define header value inline HTTP is taking too long to sort this out. Tests: https://github.com/w3c/web-platform-tests/pull/4525. Fixes #332. --- fetch.bs | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/fetch.bs b/fetch.bs index 0496eb073..0921ac1c3 100644 --- a/fetch.bs +++ b/fetch.bs @@ -373,21 +373,24 @@ a header list (list), run these steps:

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 -field-content token production. -

The definition of value -needs serious work. +

A name is a case-insensitive byte sequence that matches the +field-name token production. -

field-value allows 0x0A and -0x0D bytes which can lead to reparsing issues. +

A value is a byte sequence that matches the following conditions: + +

+ +

The definition of value is not defined in terms of an HTTP token +production as +it is broken.

To normalize a -value, remove any leading and trailing -HTTP whitespace bytes from it. +potentialValue, remove any leading and trailing HTTP whitespace bytes from +potentialValue.

A combined value, given a name (name) and