Re: [hybi] Shipping WebSockets

Mark Nottingham <mnot@mnot.net> Thu, 16 December 2010 00:58 UTC

Return-Path: <mnot@mnot.net>
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 72DEB28C0E1 for <hybi@core3.amsl.com>; Wed, 15 Dec 2010 16:58:14 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.585
X-Spam-Level:
X-Spam-Status: No, score=-104.585 tagged_above=-999 required=5 tests=[AWL=-1.986, BAYES_00=-2.599, 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 L6qeGJpdqnI1 for <hybi@core3.amsl.com>; Wed, 15 Dec 2010 16:58:13 -0800 (PST)
Received: from mxout-07.mxes.net (mxout-07.mxes.net [216.86.168.182]) by core3.amsl.com (Postfix) with ESMTP id 64CBB3A707F for <hybi@ietf.org>; Wed, 15 Dec 2010 16:58:13 -0800 (PST)
Received: from chancetrain-lm.mnot.net (unknown [118.209.2.20]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTPSA id 7732222E1F4; Wed, 15 Dec 2010 19:59:49 -0500 (EST)
Mime-Version: 1.0 (Apple Message framework v1082)
Content-Type: text/plain; charset="us-ascii"
From: Mark Nottingham <mnot@mnot.net>
In-Reply-To: <F16F4A8A-CFBD-44C1-B4A2-EC209E793AF7@mimectl>
Date: Thu, 16 Dec 2010 11:59:46 +1100
Content-Transfer-Encoding: quoted-printable
Message-Id: <07788BB1-182D-4260-A73B-8082D7463BF9@mnot.net>
References: <B0B3789C-1D3C-4A4E-B37F-8F43FFC7D905@mnot.net> <AANLkTi=Z8Hcp7FBDumgMPH4YmQ1=yqOPwAxD095yzLBt@mail.gmail.com> <AANLkTik6etgMy7jDhWtg+xqhoMzsJy-4U-xveue2gD32@mail.gmail.com>, <AANLkTimw5bHL+GwkMhPC5DwLUJZzeSvfURQQy-XSJxpi@mail.gmail.com> <F16F4A8A-CFBD-44C1-B4A2-EC209E793AF7@mimectl>
To: Gabriel Montenegro <gmonte@microsoft.com>
X-Mailer: Apple Mail (2.1082)
Cc: "hybi@ietf.org HTTP" <hybi@ietf.org>
Subject: Re: [hybi] Shipping WebSockets
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, 16 Dec 2010 00:58:14 -0000

From an HTTP standpoint, this looks good to me, and it nicely demonstrates a point I've been trying to make repeatedly -- that we don't have to fall into the trap of a false choice between the 'old' upgrade proposal and the CONNECT proposal.

I'm very interested to hear the reactions of the CONNECT proponents.

Regards,


On 16/12/2010, at 5:30 AM, Gabriel Montenegro wrote:

> FYI, we have submitted a draft that's essentially the handshake that Greg proposed a while back.
> We'd like to use it as a basis for further iteration.
>  
> http://tools.ietf.org/html/draft-montenegro-hybi-upgrade-hello-handshake
>  
> Agree on base64.
>  
> Gabriel
> From: hybi-bounces@ietf.org [hybi-bounces@ietf.org] on behalf of Greg Wilkins [gregw@webtide.com]
> Sent: Wednesday, December 15, 2010 09:03
> To: John Tamplin
> Cc: hybi@ietf.org HTTP
> Subject: Re: [hybi] Shipping WebSockets
> 
> On 15 December 2010 17:44, John Tamplin <jat@google.com> wrote:
> > On Wed, Dec 15, 2010 at 3:39 AM, Greg Wilkins <gregw@webtide.com> wrote:
> >> Does anybody object to wrapping the nonce/hash bytes sent after the
> >> handshake requests as HELLO frames?  This means that implementations
> >> only need to deal with 2 framing mechanisms not 3.
> >
> > In the absence of information about the rest of the handshake, yes.
> > All else being equal, I would prefer they be included in headers.
> 
> Well I would not argue with them being headers either.
> 
> 
> > I don't understand what you mean about 2 framing mechanisms instead of 3 though.
> 
> The connection opens, you first have to parse HTTP.  You then have to
> parse 8 bytes.  You then parse websocket packets.
> 
> Sure that is trivial if you are writing a blocking implementation.
> But if you want to scale, you have to be asynchronous and you can't
> assume that all the 8 bytes will arrive at once.  So you have to have
> a little state machine to track the arrival of those bytes.  This is
> just needless complication and will be a source of errors.    If the
> bytes are framed as WS, then you can simply switch from the HTTP
> parser to the WS parser
> 
> Also, without any framing, then any 8 bytes sent (eg another HTTP
> request) will look like the random bytes.  This is not robust
> 
> 
> 
> 
> >> Does anybody object to simple hex encoding of nonces and hashes?
> >
> > I wouldn't block it, but base64 seems better and sufficient.
> 
> sure b64 is good also.
> 
> 
> cheers
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
> 
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi

--
Mark Nottingham   http://www.mnot.net/