Re: [hybi] GET+Upgrade as emended by Greg (was Re: handshake status)

Zhong Yu <zhong.j.yu@gmail.com> Thu, 11 November 2010 19:10 UTC

Return-Path: <zhong.j.yu@gmail.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 A86743A6A5B for <hybi@core3.amsl.com>; Thu, 11 Nov 2010 11:10:10 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.059
X-Spam-Level:
X-Spam-Status: No, score=-2.059 tagged_above=-999 required=5 tests=[AWL=-0.060, BAYES_00=-2.599, J_CHICKENPOX_37=0.6]
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 uxuaE2fLc4PH for <hybi@core3.amsl.com>; Thu, 11 Nov 2010 11:10:09 -0800 (PST)
Received: from mail-ey0-f172.google.com (mail-ey0-f172.google.com [209.85.215.172]) by core3.amsl.com (Postfix) with ESMTP id ED3033A68DA for <hybi@ietf.org>; Thu, 11 Nov 2010 11:10:06 -0800 (PST)
Received: by eyd10 with SMTP id 10so1432005eyd.31 for <hybi@ietf.org>; Thu, 11 Nov 2010 11:10:37 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=E+g413B7AEHSbGW4A1GrDyE4UdWfJlLzzBimRYOdSmQ=; b=E1y0LlfXkw0sk60pE5VNw7bRnZjNSsgw42k4ejF+OzdIEVxMyzNe1FWGUxI31hioqf NGI4llREzhgnr4HZamN80aCoSliQOnZTHLHio7ibCJG5jNBN0LdLYy+HXDG2bVy04IYB Sx8qdjIN62TBnXNd5Ay3Wcqn59bk2Jb61fOJQ=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=ogJZnhczN3tGoEscwCme8L4syvplw7tXGyPNNv2L8o1CvWrPAMo8dMrCAHLW+nSdna cy37+gbTxM8rty4ICjYEsygIkw48AY5I5u/HL7K1msfFT5cDJfeuZE7b1X9pzmOXxJnA Zjmf4EvJs00tTcpzMo08wq6GBwA+f9o2usyto=
MIME-Version: 1.0
Received: by 10.216.244.11 with SMTP id l11mr1057022wer.43.1289502636792; Thu, 11 Nov 2010 11:10:36 -0800 (PST)
Received: by 10.216.51.132 with HTTP; Thu, 11 Nov 2010 11:10:36 -0800 (PST)
In-Reply-To: <20101111064207.GD487@1wt.eu>
References: <CA566BAEAD6B3F4E8B5C5C4F61710C110FBF779B@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com> <4CD82CB6.8060702@caucho.com> <AANLkTikqK2jWsB9vqcKFEnEGTJnTXFkmMBbADfCtBOVb@mail.gmail.com> <4CD88191.9090607@caucho.com> <DBB95718-C2F3-4821-ADFA-279A21483558@apple.com> <20101109053347.GF18869@1wt.eu> <AANLkTinSr7gxBY9SJ7pKxpgc_tZjAjG0tdqrie0gr5a9@mail.gmail.com> <9137A4BF-F0D3-4F0E-A156-4079C8E78127@apple.com> <AANLkTikUCkSZxaQTWy0g2bcYfQimKZ_C2sZe0eXYXma0@mail.gmail.com> <AANLkTinBbe=4y6Y5AC0S1=NB8yp2jZhY_hxcqmrcc=4U@mail.gmail.com> <20101111064207.GD487@1wt.eu>
Date: Thu, 11 Nov 2010 13:10:36 -0600
Message-ID: <AANLkTim3qBDZAWEeUz-CvX9wBVCduEaJ_MzR+FN7gTTx@mail.gmail.com>
From: Zhong Yu <zhong.j.yu@gmail.com>
To: Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; charset="ISO-8859-1"
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] GET+Upgrade as emended by Greg (was Re: handshake status)
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, 11 Nov 2010 19:10:11 -0000

On Thu, Nov 11, 2010 at 12:42 AM, Willy Tarreau <w@1wt.eu> wrote:
> On Tue, Nov 09, 2010 at 05:34:05PM -0600, Zhong Yu wrote:
>> On Tue, Nov 9, 2010 at 4:12 PM, Greg Wilkins <gregw@webtide.com> wrote:
>> > Guys,
>> >
>> > we really need to break this down.
>> >
>> > The PRIMARY purpose of my proposal was to fix the problem with
>> > intermediaries poorly handling the unframed bytes.
>> > The SECONDARY purpose of the proposal is to provide a fast fail
>> > mechanism to check that a connection can send/receive WS frames (by
>> > actually sending/receiving WS frames).
>>
>> I really like that. (although I think it's ok for client to send a WS
>> frame first)
>
> Yes it is OK for a client to send the WS frame first, however most will
> refrain from doing so because if the request fails (eg: authentication),
> they have to close the connection because of the already sent data which
> have polluted the connection. That's why while in theory, having the WS
> client send the frame first avoids one round trip, in practice it will
> not because browsers won't use that optimization.
>
> That's the same as with CONNECT through proxies. Browsers are free to
> send their HTTPS request just after the CONNECT request to save one
> round trip, but in practice they don't and prefer to wait for the 200
> response to ensure they can use the connection.
>

The client Hello WS frame I was talking about is part of the handshake
that helps to determine whether the connection is usable for WS. The
WS client should send it in the same packet of the HTTP handshake
stuff.

I am also under the impression that a WS connection is always a new
connection. A previous HTTP connection will never be re-purposed by
browser for WS. A WS connection will never be re-purposed by browser
for HTTP.

- Zhong Yu