HeaderParsing

Mark Nottingham edited this page Jan 20, 2015 · 1 revision

This is a list of error handling behaviours that might be interesting to define for HTTP header parsing as part of an optional-to-support specification.

Please include references to existing browser behaviours, bugs, etc. where possible.

Multiple Instances of single-value headers

When there are multiple occurrences of a single-value header, what happens? E.g., Content-Length, Location, Host, Content-Type, Date, Location, Referer, Last-Modified, ETag, Range, Content-Range, Age, Expires.

Note that some headers already define ordering, because of security considerations; e.g., see Host and Content-Length.

Whitespace around parameter values

The ABNF does not consistently allow whitespace around the '=' in parameters.

Extra semicolons

E.g.,

Foo: a=b;
Foo: c=d;;e=f

These are not legal as per the ABNF, but processors commonly allow them.