Re: Structured Headers for HTTP: non-ASCII

Hi Kari,

> On 3 Jul 2018, at 5:08 am, Kari Hurtta <hurtta-ietf@elmme-mailer.org> wrote:
> 
> Structured Headers for HTTP
> https://tools.ietf.org/html/draft-ietf-httpbis-header-structure-07
> 
> 4.2.  Parsing HTTP/1 Header Fields into Structured Headers
> https://tools.ietf.org/html/draft-ietf-httpbis-header-structure-07#section-4.2
> 
> |   If parsing fails - including when calling another algorithm - the
> |   entire header field's value MUST be discarded.  This is intentionally
> |   strict, to improve interoperability and safety, and specifications
> |   referencing this document cannot loosen this requirement.
> |
> |   Note that this has the effect of discarding any header field with
> |   non-ASCII characters in input_string.
> 
> But parsing algorith seems missing text:
> 
> 	If non-ASCII characters seen, fail parsing.
> 
> All algrithm have text
> 
> 	"Given an ASCII string input_string"
> 
> so they do not apply situation when there is non-ASCII characters.

[...]

> So there seems to missing top level algorithm, which is
> 
>    Given an string input_string, return parsed context.
> 
>    1. Check input_string character values.
> 
>       1. If all characters are on range %x00-%x7f,
>          let output be the result of 
>          Parsing HTTP/1 Header Fields into Structured Headers
>          (Section 4.2)
> 
>       2. Otherwise, fail parsing.
> 

Seems reasonable to me, thanks!



--
Mark Nottingham   https://www.mnot.net/

Received on Tuesday, 3 July 2018 02:38:27 UTC