Re: [hybi] workability (or otherwise) of HTTP upgrade

Dave Cridland <dave@cridland.net> Tue, 07 December 2010 09:40 UTC

Return-Path: <dave@cridland.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 F08653A6892 for <hybi@core3.amsl.com>; Tue, 7 Dec 2010 01:40:47 -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=[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 Sx333CwLgCNp for <hybi@core3.amsl.com>; Tue, 7 Dec 2010 01:40:47 -0800 (PST)
Received: from peirce.dave.cridland.net (peirce.dave.cridland.net [IPv6:2001:470:1f09:882:2e0:81ff:fe29:d16a]) by core3.amsl.com (Postfix) with ESMTP id B3C3C3A682F for <hybi@ietf.org>; Tue, 7 Dec 2010 01:40:46 -0800 (PST)
Received: from localhost (localhost.localdomain [127.0.0.1]) by peirce.dave.cridland.net (Postfix) with ESMTP id AEB531168110; Tue, 7 Dec 2010 09:42:10 +0000 (GMT)
X-Virus-Scanned: Debian amavisd-new at peirce.dave.cridland.net
Received: from peirce.dave.cridland.net ([127.0.0.1]) by localhost (peirce.dave.cridland.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5T4I3K82RpMG; Tue, 7 Dec 2010 09:42:05 +0000 (GMT)
Received: from puncture (puncture.dave.cridland.net [IPv6:2001:470:1f09:882:221:85ff:fe3f:1696]) by peirce.dave.cridland.net (Postfix) with ESMTPA id 85C1D11680FB; Tue, 7 Dec 2010 09:42:05 +0000 (GMT)
References: <AANLkTin6=8_Bhn2YseoSHGh1OSkQzsYrTW=fMiPvYps1@mail.gmail.com> <AANLkTimwiGKdy2eHve9eDezMZg+duuK-AMWpeCR4GH3m@mail.gmail.com> <AB6151A1-A334-469F-BC74-1FA73E6B689A@mnot.net> <221B3DED-A3CC-4961-9CCF-48B6EBCB241F@apple.com>
In-Reply-To: <221B3DED-A3CC-4961-9CCF-48B6EBCB241F@apple.com>
MIME-Version: 1.0
Message-Id: <3605.1291714925.544875@puncture>
Date: Tue, 07 Dec 2010 09:42:05 +0000
From: Dave Cridland <dave@cridland.net>
To: Maciej Stachowiak <mjs@apple.com>, Server-Initiated HTTP <hybi@ietf.org>, HTTP Working Group <ietf-http-wg@w3.org>, Mark Nottingham <mnot@mnot.net>
Content-Type: text/plain; delsp="yes"; charset="iso-8859-1"; format="flowed"
Content-Transfer-Encoding: 8bit
Subject: Re: [hybi] workability (or otherwise) of HTTP upgrade
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, 07 Dec 2010 09:40:48 -0000

On Mon Dec  6 23:27:02 2010, Maciej Stachowiak wrote:
> I'd like to see more detail on the data than is found in the paper,  
> but it seems to show a real-world hazard with use of Upgrade, since  
> many intermediaries do not understand it and at least a few are  
> confused into treating subsequent traffic as additional HTTP  
> requests and responses.

That's a subtle misread of the paper.

The paper shows that many intermediaries treat any traffic as HTTP  
requests and responses until they find a CONNECT, after which they  
treat the traffic as opaque except in a tiny minority of cases (what,  
4 out of 54,000?).

The paper makes no stance on whether Upgrade itself is problematic,  
just whether CONNECT is sufficient to break the intermediaries'  
assumptions.

Hence my suggestion that an ideal solution is to have the initial  
traffic from the client within the websocket appear to be a CONNECT  
(albeit, a deliberately broken one akin to Adam et al's paper).

What this results in is in formal terms, an Upgrade to Websocket  
happens, whereas to a naïve third party intermediary, there is a GET  
or POST followed by a CONNECT.

No specifications were harmed in the making of this suggestion...

Dave.
-- 
Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade