* WGs marked with an * asterisk has had at least one new draft made available during the last 5 days
Last modified 3 years ago Last modified on 2012-03-26 05:26:28

Header Field Types

(for brainstorming around issue ticket #266)

Base ABNF rules

   BWS           = <HTTPbis P1 BWS>
   OWS           = <HTTPbis P1 OWS>

   token         = <HTTPbis P1 token>
   quoted-string = <HTTPbis P1 quoted-string>

   word          = token / quoted-string

   param         = token BWS "=" BWS word

A parameter that can be value-less:

   paramvl       = token [ BWS "=" BWS word ]

the following values should be treated as equivalent (empty string)

   foo
   foo=""

Categories

Parametrized String (PS)

   thing         = <TO BE DONE based on our use cases>

   PS            = thing *( OWS ";" [ OWS param ])
   PSvl          = thing *( OWS ";" [ OWS paramvl ])

(making the param optional makes trailing semicolons valid; there's no point to forbid them)

Examples for "thing"

Accept, Content-Type: subset of token plus "/"

   text/html

Accept-Charset:

   iso-8859-1

Content-Disposition: token

   attachment
   inline

Expect: allows both token and token=value

   100-continue
   foo=bar

Link: URI characters (superset of token including ";" but not DQUOTE)

   <http://example.org/uri;bar>

List of Parametrized Strings (LoPS)

   LoPS           = #PS
   LoPSvl         = #PSvl

Categorization of existing fields

Accept
LoPS (where accept extensions are allowed to use a single token form)
Accept-Charset
LoPS (do charset names need characters outside token?)
Accept-Encoding
LoPS (do language tags need characters outside token?)
Accept-Language
LoPS
Content-Type
PS (but note the special case in RFC2397, Section 3 ("data" URI)
Content-Disposition
PS
Expect
LoPSvl
Link
LoPS

Other things to document

  • parameter ordering (not significant)
  • case sensitivity of parameter names
  • duplicate parameters (tokens compared case-insensitively) are invalid
  • make it legal to have a trailing ";" separator?
  • warn against trailing "*" in name unless RFC5987 decoding is desired