Re: [hybi] Proposal: HTTP upgrade process

"Shelby Moore" <shelby@coolpage.com> Tue, 17 August 2010 09:07 UTC

Return-Path: <shelby@coolpage.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 08EF33A6879 for <hybi@core3.amsl.com>; Tue, 17 Aug 2010 02:07:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.783
X-Spam-Level:
X-Spam-Status: No, score=-1.783 tagged_above=-999 required=5 tests=[AWL=0.816, 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 p-S9YGD8mvmv for <hybi@core3.amsl.com>; Tue, 17 Aug 2010 02:07:11 -0700 (PDT)
Received: from www5.webmail.pair.com (www5.webmail.pair.com [66.39.3.83]) by core3.amsl.com (Postfix) with SMTP id EF8F33A688A for <hybi@ietf.org>; Tue, 17 Aug 2010 02:07:10 -0700 (PDT)
Received: (qmail 23926 invoked by uid 65534); 17 Aug 2010 09:07:46 -0000
Received: from 121.97.54.174 ([121.97.54.174]) (SquirrelMail authenticated user shelby@coolpage.com) by sm.webmail.pair.com with HTTP; Tue, 17 Aug 2010 05:07:46 -0400
Message-ID: <e2c63402e7f2b66428df3948498d6e45.squirrel@sm.webmail.pair.com>
In-Reply-To: <903054FE-EEFB-46A6-A008-9EBE71EB873A@d2dx.com>
References: <AANLkTi=aR8+LgcoXDVhuu-HC2k3TB6YP2WcXEo8yC1Jz@mail.gmail.com> <903054FE-EEFB-46A6-A008-9EBE71EB873A@d2dx.com>
Date: Tue, 17 Aug 2010 05:07:46 -0400
From: Shelby Moore <shelby@coolpage.com>
To: Vladimir Katardjiev <vladimir@d2dx.com>
User-Agent: SquirrelMail/1.4.20
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
X-Priority: 3 (Normal)
Importance: Normal
Cc: hybi@ietf.org
Subject: Re: [hybi] Proposal: HTTP upgrade process
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: shelby@coolpage.com
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, 17 Aug 2010 09:07:12 -0000

[snip]

> That's (relatively) easy. From Ian's omnibus WebSocket Feedback mail on
> April 15:
>
>>> If the handshake messages are to contain content, then they MUST have
>>> headers to indicate the content length to be legal HTTP: in this case,
>>> a
>>> Content-Length header would be appropriate
>>
>> The idea here is that the 8 random bytes are part of the post-Upgrade
>> Web
>> Socket connection, not the GET request, so that any intermediaries will
>> fail to send the data along if they do any interpretation, thus failing
>> early. If we included them in the Content-Length then unfortunately the
>> early failure mode of intermediaries would be lost.
>
> If memory serves, it was also used for checking if the server programmer
> is also capable of following instructions and generating hashes, a notion
> that might not be required if the working assumption is no longer that
> every script implements its own WebSocket stack. This would leave the main
> reason for those eight bytes a sort of "fail-early" test, so that a
> WebSocket connection will terminate before the "open" event has been fired
> in the browser. This is considered preferable to firing the "open" event
> after a successful handshake, but then losing the connection because,
> oops, after all it was an incompatible intermediary.


But then forcing every proxy in the universe to be upgraded with a
specific code path every time someone else uses HTTP Upgrade to create a
new protocol with "early fail" hack:

http://www.ietf.org/mail-archive/web/hybi/current/msg03203.html

If not failing after WebSocket "open" event is a high priority, then
"officially" (admittedly imperfect and flexible process) declared
concensus was we need to find another transport option, rather than hack
the HTTP spec.

Maybe this is off-topic for this thread is I think about "process", not
the details of the technical debate.

[snip]