Re: [hybi] Web sockets and existing HTTP stacks

Jamie Lokier <jamie@shareable.org> Wed, 03 February 2010 02:21 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 79AA13A6BB7 for <hybi@core3.amsl.com>; Tue, 2 Feb 2010 18:21:32 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.617
X-Spam-Level:
X-Spam-Status: No, score=-2.617 tagged_above=-999 required=5 tests=[AWL=-0.018, 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 Xr4VyP3YT2O4 for <hybi@core3.amsl.com>; Tue, 2 Feb 2010 18:21:31 -0800 (PST)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id A6A553A6BAB for <hybi@ietf.org>; Tue, 2 Feb 2010 18:21:31 -0800 (PST)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1NcUsd-0005Af-7f; Wed, 03 Feb 2010 02:22:11 +0000
Date: Wed, 03 Feb 2010 02:22:11 +0000
From: Jamie Lokier <jamie@shareable.org>
To: Greg Wilkins <gregw@webtide.com>
Message-ID: <20100203022211.GQ32743@shareable.org>
References: <20091219005442.GA10949@shareable.org> <4B2C287E.1030006@webtide.com> <Pine.LNX.4.64.1001310835410.3846@ps20323.dreamhostps.com> <5821ea241001311219j111d25a3h27fb2d05a2ece32d@mail.gmail.com> <5821ea241001311226s3d2092d7kef13f958db3a0132@mail.gmail.com> <A3071537-C3A5-4C0D-945F-618382435383@apple.com> <5c902b9e1001312024k7ba2df94iceeb0828051fddaf@mail.gmail.com> <568D478E-DEE2-440B-8A71-8F1B9970E60D@apple.com> <4B671D89.3060506@webtide.com> <20100203022056.GP32743@shareable.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <20100203022056.GP32743@shareable.org>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: hybi@ietf.org
Subject: Re: [hybi] Web sockets and existing HTTP stacks
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:21:32 -0000

Jamie Lokier wrote:
> Greg Wilkins wrote:
> > Maciej Stachowiak wrote:
> > >> Then if we ever get HTTP/1.2 or HTTP/2.0, websocket will not break!
> > >
> > > If the client tries to upgrade an HTTP/1.1 request to WebSocket and the
> > > server gives an HTTP/1.2 or HTTP/2.0 response, then it had better break!
> > > We'll need to adjust the client side of the protocol before we can let
> > > servers respond with different versions of HTTP.
> > 
> > Why?
> > 
> > Saying HTTP/1.2 in a response line does not make the response
> > version 1.2. The version of the response is controlled by the version of
> > the request. The version in  the response says what the server is capable
> > of.  A HTTP/1.2 capable server should be able to server 1.0 websocket
> > clients without further breaking the http protocol by hacking about its
> > version for one particular upgrade protocol.
> 
> This is not an issue, because a WebSocket server knows it's responding
> to a WebSocket/1.0 client and can send the required response.

The real trouble is how will a WebSocket/1.1 client interoperate with
a WebSocket/1.0 server, without trying, failing, then starting another
connection to try again which is wasteful and not entirely reliable.

-- Jamie