1 of 7

Web-compatible header value parsers

Hastily made by @annevk

2 of 7

Goals

  • Clients agree on parsing, including on erroneous input
  • Parsing is robust in the face of naïvely-combining intermediaries

3 of 7

Revised parsers

  • Obtain the combined value
  • Parse that

4 of 7

Contrived example

  • Content-Type: text/html; charset=”�Content-Type: egal”
  • Parser operates on text/html; charset=“, egal”

(Please excuse the incorrect quotes.)

5 of 7

Investigation is ongoing

  • Mostly complete
    • Content-Length
    • Content-Type
    • X-Content-Type-Options
    • Various CORS headers
  • Tracking issue: https://github.com/whatwg/fetch/issues/814

6 of 7

Tests

7 of 7

Would love your help

  • Many thanks to Matt Menke
  • GitHub
    • whatwg/fetch
    • web-platform-tests/wpt