This page is an attempt to document some discrepancies between browsers and RFC 2068 (and its successor, RFC 2616) because the HTTP WG seems unwilling to resolve those issues. Hopefully one day someone writes HTTP5 and takes this into account.
- 1 Header parsing: newlines
- 2 Header parsing: handling "duplicates"
- 3 Content-Encoding
- 4 Content-Length
- 5 Content-Type parsing
- 6 Redirects
- 7 Location header: URLs
- 8 Location header: duplicates
- 9 Location header: fragment
- 10 Content-Location header
- 11 Accept header
- 12 Requiring two interoperable browser implementations
- 13 Assume Vary: Cookie
- 14 HTTP 0.9 (and Legacy Shoutcast support)
Header parsing: newlines
Header parsing: handling "duplicates"
Under certain conditions this header needs to be stripped: http://hg.mozilla.org/mozilla-central/file/366b5c0c02d3/netwerk/protocol/http/nsHttpChannel.cpp#l4042
Not raised. Monkey patched in Fetch.
In cases where Content-Length doesn't equal the actual content length, browsers truncate to the Content-Length value if it's smaller, but behaviour varies if Content-Length value is larger than actual content. Test results: https://github.com/slightlyoff/ServiceWorker/issues/362#issuecomment-49011736
Pretty sure I (Anne) raised this at some point. A trailing ";" after a MIME type is considered invalid, but works fine in all implementations.
mnot: relevant spec - http://httpwg.github.io/specs/rfc7231.html#media.type I don't remember this being raised; we can either record it as errata or work it into the next revision.
Potential replacement: http://mimesniff.spec.whatwg.org/#parsing-a-mime-type
For 301 and 302 redirects browsers uniformly ignore HTTP and use GET for the subsequent request if the initial request uses an unsafe method. (And the user is not prompted.)
(Seems this is mostly solved now. Would still be good to explicitly require behavior here. Maybe in Fetch.)
Location header: URLs
Browsers handle relative URIs and URIs with invalid characters in interoperable fashion.
mnot: see note in: http://httpwg.github.io/specs/rfc7231.html#header.location If there's an updated URL spec that's able to be referenced when 7231 is revised, we can point at that.
Location header: duplicates
Nothing defines what happens with multiple Location headers. Apparently if their values match it is okay, but otherwise a network error.
Location header: fragment
Browsers cannot support this header.
This has apparently been fixed by making Content-Location have no UA conformance criteria. (It's not clear what it's good for at this point.)
Accept header should preferably be done without spaces.
(not raised, odinho: I came across a site that didn't like the spaces, the developer said he'd gotten it off php.net or stackoverflow. He fixed the site. This could be disputed.)
Requiring two interoperable browser implementations
To prove that RFC 2616 can be implemented there should be two compatible implementations in browsers.
mnot: That'll happen when RFC723x go to full Standard.