Re: [hybi] Redesigning the Web Socket handshake

Jamie Lokier <jamie@shareable.org> Wed, 03 February 2010 02:56 UTC

Return-Path: <jamie@shareable.org>
X-Original-To: hybi@core3.amsl.com
Delivered-To: hybi@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 80EAF3A6BBB for <hybi@core3.amsl.com>; Tue, 2 Feb 2010 18:56:57 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.616
X-Spam-Level:
X-Spam-Status: No, score=-2.616 tagged_above=-999 required=5 tests=[AWL=-0.017, BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id G5X05yjkGJ6D for <hybi@core3.amsl.com>; Tue, 2 Feb 2010 18:56:56 -0800 (PST)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id A3BC23A69CF for <hybi@ietf.org>; Tue, 2 Feb 2010 18:56:56 -0800 (PST)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1NcVQu-0005md-BK; Wed, 03 Feb 2010 02:57:36 +0000
Date: Wed, 03 Feb 2010 02:57:36 +0000
From: Jamie Lokier <jamie@shareable.org>
To: Ian Hickson <ian@hixie.ch>
Message-ID: <20100203025736.GS32743@shareable.org>
References: <Pine.LNX.4.64.1002012305000.21600@ps20323.dreamhostps.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <Pine.LNX.4.64.1002012305000.21600@ps20323.dreamhostps.com>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: hybi@ietf.org
Subject: Re: [hybi] Redesigning the Web Socket handshake
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/hybi>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 03 Feb 2010 02:56:57 -0000

Ian Hickson wrote:
> I'm especially interested in feedback regarding actual effects these 
> changes would have on concrete deployed softare (like, how much easier 
> would this make deploying Web Socket on a specific load balancer) and 
> protocols (like, what actual attacks does this prevent or allow).

I think the question of CONNECT vs. Upgrade must come down to:
What works over real proxies?

CONNECT works over port 443, we know that.  We also know it forwards
the data in a timely fashion, without depending on the byte values.
It is widely used.

Upgrade probably hasn't been tested much.  It ought to use much the
same implementation in a proxy, after the handshake, but you know... I
wouldn't count on Upgrade working, without testing it against a wide
range of real proxies.  Is there any data about this?
Are you listening, Google? :-)

An interesting idea I've looked at, which would be tricky but _really_
improve widespread support (and compatibility), would be to send
something which looks like a valid HTTP long-polling request, and
allow the server and any proxies to proactively signal that they'll
convert it to the more efficient WebSocket - when they will.  When
they won't, communication continues over HTTP long-polling, carrying
the same messages and subprotocols over that.  I guarantee if that
could be pulled off, everyone would start using WebSocket asap ;-)

-- Jamie