alt-svc header field syntax

So,

>  Alt-Svc     = 1#( alternate *( OWS ";" OWS parameter ) )
>    alternate   = <"> protocol-id <"> "=" port

<"> can be written better as DQUOTE.

That being said, HTTPbis P2 has this advice:

"Note that double-quote delimiters almost always are used with the 
quoted-string production; using a different syntax inside double-quotes 
will likely cause unnecessary confusion."

So I'd propose to either make it a full blown quoted-string, or to use a 
different quote character ("<" and ">"?).

>    Finally, note that while it may be technically possible to put
>    content other than printable ASCII in a HTTP header, some
>    implementations only support ASCII (or a superset of it) in header
>    field values.  Therefore, this field SHOULD NOT be used to convey
>    protocol identifiers that are not printable ASCII, or those that
>    contain quote characters.

The note wrt to quote characters is either a statement of fact (can't), 
or should be a MUST.

A simpler way out of this might be to say:

   alternate   = alt-token "=" port
   alt-token   = token ; alpn protocol identifier where non-token octets 
are uri-percent-escaped

That (1) avoids quoting, (2) makes it possible to use all syntactically 
valid protocol identifiers, and last but not least (3) makes the common 
case simpler.

Best regards, Julian

Received on Wednesday, 5 March 2014 20:00:16 UTC