IETF 90 - Thoughts on HTTP Header Field Parsing

Julian Reschke, greenbytes

Background

Problem Statement

Most of these slides were done for IETF 81; we haven't made a lot of progress since!

Example: the List Production and repeating Header Field instances

  Foo: a
  Foo: b    

is equivalent to

  Foo: a, b    
  If-Match: "strong", W/"weak", "oops, a \"comma\""    

Example: the List Production and repeating Header Field instances

Combining list production with structured field syntax:

  WWW-Authenticate = 1#challenge
  challenge        = auth-scheme [ 1*SP ( token68 / #auth-param ) ]
  auth-param       = token BWS "=" BWS ( token / quoted-string )

Example:

  WWW-Authenticate: Newauth realm="newauth";
    test="oh, a \"comma\""; foo=a'b'c, Basic realm="basic"
    

Example: Parameters - Whitespace, Quoting

  param = token "=" ( token / quoted-string )    
  foo=bar; foo='bar'; foo="bar"; foo = "bar"    

Proposals (2011)

Proposals (2014)

For existing header fields (including those in the base specs):

Proposals (2014) (continued)

Thought experiment in draft-reschke-http-jfv: what if header field values would use JSON?

  WWW-Authenticate: { Newauth : {
                                  realm: "newauth", 
                                  test: "oh, a \"comma\"",
                                  foo: "a'b'c" }},
                    { Basic : { realm: "basic" }}
    

But:

Links

My tests:

...and then there's also http://redbot.org/.