[whatwg] Web Sockets

Ian Hickson ian at hixie.ch
Tue Jul 15 00:20:23 PDT 2008


On Mon, 14 Jul 2008, Honza Bambas wrote:
>
> I am just concern about the way the protocol is specified. When I read 
> the notes it is obvious the communication is actually an HTTP 
> communication. Let's say I am a browser developer. Let's say I have to 
> enhance my already fully armed browser with all the support for HTTP 
> protocol and proxy/HTTP authentication, cookies, fixed many security 
> issues etc. It would be reasonable to use my HTTP implementation and 
> build ws/wss client protocol on top of it. Problem is that spec counts 
> with exact byte compare but my implementation might possibly change 
> headers order or HTTP version (to higher one). This would violate the 
> WHATWG spec but the request according to HTTP protocol would still be 
> correct.

On the browser side I don't think there is any reason to reuse the HTTP 
implementation. This isn't HTTP, and isn't intended, on the client-side, 
to be even like HTTP. It's similarity to HTTP is only intended to allow 
servers to Upgrade to WSP so that one IP/port combination can be shared 
between HTTP and WSP.


> This might make the implementation (and therefor also adoption) of this 
> technology more complicated for browser developers.

Given how easy the handshake is to implement on the client, I don't think 
that's a concern at all.


> Why exactly is in the spec intention to do exact byte-to-byte match? To 
> allow very easy implementation using scripts?

Making writing servers easy and having a handshake that other protocols 
can't be tricked into resembling are the two primary driving forces behind 
the current design.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list