[whatwg] [hybi] WebSocket sub protocol name.
Fumitoshi Ukai (鵜飼文敏)
ukai at chromium.org
Sun Dec 6 23:40:02 PST 2009
On Mon, Dec 7, 2009 at 4:26 PM, Ian Hickson <ian at hixie.ch> wrote:
> On Mon, 7 Dec 2009, Fumitoshi Ukai (�µ~\飼æ~V~Gæ~U~O) wrote:
> > On Mon, Dec 7, 2009 at 3:21 PM, Ian Hickson <ian at hixie.ch> wrote:
> > > On Mon, 7 Dec 2009, Fumitoshi Ukai (榈~\椋兼~V~G鎫U~O) wrote:
> > > >
> > > > At 1.130 of "The Web Socket API", it adds the sub-protocol name must
> > > > be an ASCII string with no U+000A LINE FEED (LF) or U+000D CARRIAGE
> > > > RETURN (CR) characters in it.
> > > > But "The Web Socket protocol" 3.1 Parsing Web Socket URLs, says
> > > > 1. If /protocol/ is specified but is either the empty string or
> > > > contains characters that are not in the range U+0021 to
> > > > then fail this algorithm.
> > >
> > > Woops, that step is a copy-and-paste mistake from a past version. My
> > > apologies. I've removed that sentence; it should not have been
> > > present.
> > Thanks for fixing.
> > > 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
And, why is it limited to ASCII instead of UTF-8?
> Ian Hickson U+1047E )\._.,--....,'``. fL
> http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
> Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the whatwg