Re: [hybi] WebSocket feedback

Vladimir Katardjiev <vladimir@d2dx.com> Thu, 04 March 2010 09:01 UTC

Return-Path: <vladimir@d2dx.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 388D33A8448 for <hybi@core3.amsl.com>; Thu, 4 Mar 2010 01:01:02 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[AWL=0.001, 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 sYyNltB2Earn for <hybi@core3.amsl.com>; Thu, 4 Mar 2010 01:01:01 -0800 (PST)
Received: from homiemail-a10.g.dreamhost.com (caiajhbdcbhh.dreamhost.com [208.97.132.177]) by core3.amsl.com (Postfix) with ESMTP id F17E63A82F0 for <hybi@ietf.org>; Thu, 4 Mar 2010 01:01:00 -0800 (PST)
Received: from dhcp122.verkstad.net (dhcp122.verkstad.net [192.36.157.122]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by homiemail-a10.g.dreamhost.com (Postfix) with ESMTPSA id 4A54F280058 for <hybi@ietf.org>; Thu, 4 Mar 2010 01:01:02 -0800 (PST)
From: Vladimir Katardjiev <vladimir@d2dx.com>
Mime-Version: 1.0 (Apple Message framework v1077)
Content-Type: multipart/signed; boundary="Apple-Mail-3--524233391"; protocol="application/pkcs7-signature"; micalg="sha1"
Date: Thu, 04 Mar 2010 10:00:58 +0100
In-Reply-To: <4B8F7399.40208@webtide.com>
To: Hybi <hybi@ietf.org>
References: <8B0A9FCBB9832F43971E38010638454F032E566DDF@SISPE7MB1.commscope.com> <Pine.LNX.4.64.1002150605580.29686@ps20323.dreamhostps.com> <4B8F6056.8060809@webtide.com> <CE4EF44A-6C8F-43BC-ABF4-777C1149A16F@d2dx.com> <4B8F72FA.2050908@webtide.com> <4B8F7399.40208@webtide.com>
Message-Id: <3212A766-9009-4DD6-BA63-53CCF4E98E5D@d2dx.com>
X-Mailer: Apple Mail (2.1077)
Subject: Re: [hybi] WebSocket feedback
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: Thu, 04 Mar 2010 09:01:02 -0000

Heya Greg,

> GET's can have content.  It's just the browsers mostly don't send
> content with GETs.

Damn. I've been mired in REST stuff for so long, I could've sworn GETs shouldn't contain any body. You're correct, of course. Still, I do believe in this case it's not intended as an entity body, so not including Content-Length and Content-Type implies there is none (and is a valid way to send a request).

Again, I think the intention is to break the request if an intermediary doesn't handle WebSockets so sending the first WebSocket message as an entity body is probably not the desired effect.

> The server needs to consider the bytes of content before formulating
> the accepting the upgrade request and sending the 101 response, so
> it can't be considered as data in the stream after the 101.

Unless I'm reading it completely wrong, the contents of the 101 handshake (since it has no content-length) can and are constructed purely from the headers. The challenge response contains data from both headers and the 8-byte challenge that comes later, but it's fine to do it. The steps of the algorithm could be reordered with no change of the output so what we call it is a matter of interpretation. Po-tay-to, poh-ta-to.

Vladimir