RE: Issue with draft-ietf-httpbis-h2-websockets-07 (in RFC Editor queue)

Ick.  This looks like a 6455 erratum – the registration is “WebSocket” but all the (non-normative) examples are “websocket”.  Case-insensitive matching is explicitly permitted, and RFC2616/2817 don’t clearly say that Upgrade tokens are or aren’t case-sensitive that I can find.  (Nor do I see it in 7230…?)

I agree that the direct fix is to register both.

From: Patrick McManus <mcmanus@ducksong.com>
Sent: Thursday, August 9, 2018 2:32 PM
To: Julian Reschke <julian.reschke@gmx.de>
Cc: HTTP Working Group <ietf-http-wg@w3.org>; Alexey Melnikov <alexey.melnikov@isode.com>; Patrick McManus <mcmanus@ducksong.com>
Subject: Re: Issue with draft-ietf-httpbis-h2-websockets-07 (in RFC Editor queue)

6455 also uses lower case "websocket" when sending (and it mandates case insensitive parsing when receiving) even though the registry apparently has "Websocket" defined.

I'd prefer to just register websocket as an alias. in my experience that's the normal usage.



On Thu, Aug 9, 2018 at 1:16 AM, Julian Reschke <julian.reschke@gmx.de<mailto:julian.reschke@gmx.de>> wrote:
<https://tools.ietf.org/html/draft-ietf-httpbis-h2-websockets-07#section-4>:
   o  A new pseudo-header field :protocol MAY be included on request
      HEADERS indicating the desired protocol to be spoken on the tunnel
      created by CONNECT.  The pseudo-header field is single valued and
      contains a value from the HTTP Upgrade Token Registry located at
      https://www.iana.org/assignments/http-upgrade-tokens/http-upgrade-

      tokens.xhtml

And in <https://www.iana.org/assignments/http-upgrade-tokens/http-upgrade-tokens.xhtml>:
WebSocket       The Web Socket Protocol                 [RFC6455]

But, later on in <https://tools.ietf.org/html/draft-ietf-httpbis-h2-websockets-07#section-5> and subsequent examples:
   The :protocol pseudo-header field MUST be included in the CONNECT
   request and it MUST have a value of "websocket" to initiate a
   WebSocket connection on an HTTP/2 stream.  Other HTTP request and
   response header fields, such as those for manipulating cookies, may
   be included in the HEADERS with the CONNECT method as usual.  This
   request replaces the GET-based request in [RFC6455] and is used to
   process the WebSockets opening handshake.

Note that the registered upgrade token is "WebSocket", but the spec requires the use of "websocket".

See also <https://github.com/httpwg/http-core/issues/8>.

Recommendation, in order of preference:

1) Fix the spec to use "WebSocket" consistently.

2) Register "websocket" as alias.

It would probably be good to also clarify that value matching for ":protocol" is consistent with "Upgrade" in HTTP/1.1, meaning case-sensitive.

Best regards, Julian

Received on Thursday, 9 August 2018 23:26:13 UTC