Re: Hello from Mozilla

From: Ian Hickson <ian_at_hixie.ch>
Date: Wed, 15 Jul 2009 23:00:09 +0000 (UTC)

On Wed, 15 Jul 2009, Alex Rousskov wrote:
> On 07/15/2009 01:59 AM, Ian Hickson wrote:
> > On Wed, 15 Jul 2009, Mark Nottingham wrote:
> >> Can you remind me why you need the handshake to look like valid HTTP
> >> again? I think that's the crux here.
> >
> > Because in some cases, people will want to share the same port for their
> > HTTP server as for their WebSocket server. For example, if they want to do
> > TLS-WebSocket-over-port-443, in the case where that host also has an HTTPS
> > server on port 443.
>
> Can such a dual-purpose port-sharing server implement both HTTP and
> WebSocket stacks and use the right stack depending on the first byte[s]
> of the incoming message?

Isn't that exactly what an HTTP Upgrade is?

> If port sharing is the primary motivation here, then dual protocol stack
> support seems like the right solution.
>
> This can be even implemented as a dumb TCP-level "switch" application
> that connects to either an HTTP server or a WebSocket server behind it.
> No "binary" HTTP messages, no risk of HTTP intermediaries screwing up
> with the not-really-HTTP-but-looking-like-one traffic. Just two
> completely different protocols sharing the same port.

That's exactly what WebSocket is doing.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Wed Jul 15 2009 - 23:00:13 MDT

This archive was generated by hypermail 2.2.0 : Thu Jul 16 2009 - 12:00:05 MDT