http2/http2-spec — pull request #106 by phluid61 (2013-06-03 04:16:04+00:00)
Title: change connection header magic string

If the goal of the connection header magic string is to emulate a HTTP/1.x request in a way that is both as transparent as possible (can be parsed as HTTP/1.x) and unambiguously differentiated (could NOT be understood as HTTP/1.x), I understand the criteria to be:

When interpreted as a HTTP/1.x request:
* the HTTP-Version must be "HTTP/2.0";
* the Request-URI must be "*", since this message is not resource-specific;
* the Method should not coincide with any extant HTTP/1.x methods, since a poorly-implemented device might, for example, only inspect the minor part of the HTTP-Version and misinterpret the header as a HTTP/1.0 request;
* the Method should be exactly three or four bytes in length, since there are known implementations in the wild that have this expectation.

To fit in a 24-byte structure, using the standard pattern, we would have to use either a three-byte Method and a two-byte entity (before the final "\r\n\r\n"), or a four-byte Method and a one-byte entity. I think 3-2 is better, aesthetically.

I also think it's better to avoid encoding a metasyntactic variable into the standard. "FOO" is universally used as a placeholder for user-supplied data, and it may be confusing for the spec to require implementers to send or expect the literal value "FOO". Additionally there is a legitimate chance that there are implementations in the wild that actually use "FOO" as a method, e.g. for developmental purposes.

I propose "CON" and "go" as the Method and message entity parts.

This was discussed on the HTTP Working Group and essentially discarded as a minor detail, so I'm making this pull request without contacting the list so that editors and coordinators can make the final decision.