W3C home > Mailing lists > Public > whatwg@whatwg.org > December 2009

[whatwg] WebSocket sub protocol name.

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 8 Dec 2009 07:59:10 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0912080753260.16061@hixie.dreamhostps.com>
On Tue, 8 Dec 2009, Fumitoshi Ukai (??~\????~V~G?~U~O) wrote:
> 
> protocol now accepts U+0020. Is it ok to use U+0020 only in /protocol/ ?
> (e.g. new WebSocket("ws://example.com/", " "); )
> It seems space is optional after colon in field of handshake message, how
> can we distinguish U+0020 and U+0020 U+0020 ?

The space isn't optional (both the client and the server are required to 
send it before the subprotocol name), it's just that the client will 
handle a missing space gracefully. Maybe we should remove that "feature", 
and require that the space be present, closing the connection otherwise?
I don't feel strongly either way.

Anyway, the point is that "WebSocket-Protocol: " is the empty string, and 
"WebSocket-Protocol:  " is a one-space protocol name.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 7 December 2009 23:59:10 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:54 UTC