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

[whatwg] WebSocket sub protocol name.

From: Ian Hickson <ian@hixie.ch>
Date: Mon, 7 Dec 2009 08:05:42 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0912070756380.5629@hixie.dreamhostps.com>

On Mon, 7 Dec 2009, Fumitoshi Ukai (??~\????~V~G?~U~O) wrote:
> > > >
> > > > Control characters are allowed (though using them would be silly).
> > >
> > > Why are control characters (except LF and CR) allowed?
> >
> > There doesn't seem to be a good reason to exclude them, and excluding 
> > them would lead to a more complicated processing model.
> 
> In HTTP, field-content is TEXT or combinations of token, separators, and 
> quoted-string. TEXT, or token, separators excludes CTLs. So, we must use 
> quoted-string in WebSocket-Protocol: if protocol contains CTLs?

Oh, I forgot that HTTP had the no-CTL restriction. Good point. I've 
updated the spec to be consistent with this.


> And, why is it limited to ASCII instead of UTF-8?

Because the HTTP working group refuse to allow UTF-8 in HTTP headers for 
reasons that I don't really understand, and the handshake is supposed to 
be valid HTTP.


On Mon, 7 Dec 2009, Julian Reschke wrote:
> 
> There isn't a good reason to disallow control characters in a *name*????

Not as far as I can tell, no... what would a good reason be?

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

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