Re: [hybi] Web sockets and existing HTTP stacks

Maciej Stachowiak <mjs@apple.com> Tue, 02 February 2010 06:10 UTC

Return-Path: <mjs@apple.com>
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 CB9663A6A7E for <hybi@core3.amsl.com>; Mon, 1 Feb 2010 22:10:32 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.585
X-Spam-Level:
X-Spam-Status: No, score=-106.585 tagged_above=-999 required=5 tests=[AWL=0.013, BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-4, USER_IN_WHITELIST=-100]
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 PAZ352Znkoro for <hybi@core3.amsl.com>; Mon, 1 Feb 2010 22:10:28 -0800 (PST)
Received: from mail-out4.apple.com (mail-out4.apple.com [17.254.13.23]) by core3.amsl.com (Postfix) with ESMTP id 0524D3A6818 for <hybi@ietf.org>; Mon, 1 Feb 2010 22:10:25 -0800 (PST)
Received: from relay11.apple.com (relay11.apple.com [17.128.113.48]) by mail-out4.apple.com (Postfix) with ESMTP id 0971989B9DE7 for <hybi@ietf.org>; Mon, 1 Feb 2010 22:11:02 -0800 (PST)
X-AuditID: 11807130-b7b0aae00000102c-47-4b67c1f50e6f
Received: from elliott.apple.com (elliott.apple.com [17.151.62.13]) by relay11.apple.com (Apple SCV relay) with SMTP id 41.CF.04140.5F1C76B4; Mon, 1 Feb 2010 22:11:01 -0800 (PST)
MIME-version: 1.0
Content-type: multipart/alternative; boundary="Boundary_(ID_DNqb/Z8j6NUOkwdcGWi6AA)"
Received: from [10.0.1.5] (c-69-181-42-237.hsd1.ca.comcast.net [69.181.42.237]) by elliott.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0KX7008Z1AIDNE10@elliott.apple.com> for hybi@ietf.org; Mon, 01 Feb 2010 22:11:01 -0800 (PST)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <ad99d8ce1002012139l3b8f525bj9caf7861332f3d18@mail.gmail.com>
Date: Mon, 01 Feb 2010 22:11:00 -0800
Message-id: <1427E183-FDBC-4854-9455-B93AB28DAB03@apple.com>
References: <557ae280911171402v7546e5e7n93a1e57f87dc10e5@mail.gmail.com> <557ae280911200711i5493e654k67c1f5f07336bfb9@mail.gmail.com> <Pine.LNX.4.62.0912032347360.15540@hixie.dreamhostps.com> <4B2C1D52.9020505@webtide.com> <5c902b9e0912181640n497169cdrfa71f9a2908e6ef3@mail.gmail.com> <20091219005442.GA10949@shareable.org> <4B2C287E.1030006@webtide.com> <Pine.LNX.4.64.1001310835410.3846@ps20323.dreamhostps.com> <4B67A237.2040505@webtide.com> <ad99d8ce1002012139l3b8f525bj9caf7861332f3d18@mail.gmail.com>
To: Roberto Peon <fenix@google.com>
X-Mailer: Apple Mail (2.1077)
X-Brightmail-Tracker: AAAAAQAAAZE=
Cc: Greg Wilkins <gregw@webtide.com>, 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: Tue, 02 Feb 2010 06:10:33 -0000

On Feb 1, 2010, at 9:39 PM, Roberto Peon wrote:

> 
> 
> On Mon, Feb 1, 2010 at 7:55 PM, Greg Wilkins <gregw@webtide.com> wrote:
> Ian Hickson wrote:
> 
> > Similarly, the server, when parsing
> > the headers in "HTTP" mode, is unaffected by the order -- and indeed, the
> > Web Socket spec doesn't require _anything_ from the server in terms of
> > parsing the client request. You can completely ignore it for all the spec
> > cares. All that matters is that you send back a specific handshake. But if
> > you're sending back the handshake, then you're a Web Socket server, so why
> > do we need to follow HTTP rules? We've already established the client is a
> > Web Socket client, so what on earth is the point of using HTTP rules?
> 
> We need to follow HTTP rules because we are in a HTTP server
> that has implemented the HTTP standard and until the CRLF
> is sent after the 101 response, HTTP rules OK!
> 
> Ian-- I know that I'd kick scream and generally raise hell about putting that in our little proxy were it not HTTP compliant until the end of the 101 response.

The current handshake response *is* HTTP compliant, it's just that the HTTP response needs to meet some additional restrictions, or it will be rejected by the client. Those restrictions include requirements to include particular response headers (apparently not controversial), to include particular text in the status line (only mildly controversial), and to require that the first two response headers headers must be two specific ones, with an exact required order and capitalization (this appears to bug people the most and perhaps creates the most headaches inside existing server code bases).

Are these restrictions a practical problem for you? If so, which are problematic, and can you describe the concrete issue? Knowing the intensity of your response is less useful than knowing the reason for it.

Regards,
Maciej