Re: [hybi] #4: handshake does not work properly with HTTP reverse proxy.

Willy Tarreau <w@1wt.eu> Sat, 17 July 2010 06:15 UTC

Return-Path: <w@1wt.eu>
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 BB8FE3A67F0 for <hybi@core3.amsl.com>; Fri, 16 Jul 2010 23:15:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.463
X-Spam-Level:
X-Spam-Status: No, score=-4.463 tagged_above=-999 required=5 tests=[AWL=-2.420, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 nysU9cDiJcCU for <hybi@core3.amsl.com>; Fri, 16 Jul 2010 23:15:49 -0700 (PDT)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id 7CC573A6359 for <hybi@ietf.org>; Fri, 16 Jul 2010 23:15:48 -0700 (PDT)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id o6H6Fv1Y030056; Sat, 17 Jul 2010 08:15:57 +0200
Date: Sat, 17 Jul 2010 08:15:57 +0200
From: Willy Tarreau <w@1wt.eu>
To: Jamie Lokier <jamie@shareable.org>
Message-ID: <20100717061557.GB29907@1wt.eu>
References: <068.da8db0c773647cb0ed73d576f39e93ee@tools.ietf.org> <20100717023749.GA2426@shareable.org>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <20100717023749.GA2426@shareable.org>
User-Agent: Mutt/1.4.2.3i
Cc: hybi@ietf.org, hybi issue tracker <trac@tools.ietf.org>
Subject: Re: [hybi] #4: handshake does not work properly with HTTP reverse proxy.
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: Sat, 17 Jul 2010 06:15:50 -0000

On Sat, Jul 17, 2010 at 03:37:49AM +0100, Jamie Lokier wrote:
> hybi issue tracker wrote:
> > #4: handshake does not work properly with HTTP reverse proxy.
> > -------------------------------------------+--------------------------------
> >  Reporter:  salvatore.loreto@???             |       Owner:     
> >      Type:  defect                         |      Status:  new
> >  Priority:  critical                       |   Milestone:     
> > Component:  thewebsocketprotocol           |     Version:     
> >  Severity:  Active WG Document             |    Keywords:     
> > -------------------------------------------+--------------------------------
> >  the  handshake in draft-ietf-hybi-thewebsocketprotocol-00 (as in draft 76)
> >  does not work properly in presence of HTTP reverse proxy.
> > 
> >  The 8-bytes nonce from the client is not advertised as a content-length,
> >  so it is not forwarded by the reverse proxy as it is either part of a next
> >  request or pending data for when the handshake completes. Unfortunately,
> >  the server wants those bytes to complete the handshake, so we have a dirty
> >  deadlock not even detectable by the end user.
> > 
> >  for more information:
> >  http://www.ietf.org/mail-archive/web/hybi/current/msg02149.html
> 
> >From discussions on the hybi list several months ago, several times, I
> got the impression that failure to work through any kind of HTTP proxy
> was *intentional* in the handshake design.
> 
> I don't personally agree with that as a design goal, but if it is the
> design goal than this issue #4 isn't a bug.

If that goal really is to be supported, then the initial HTTP-like
handshake is overly complicated and expensive, and will serve no
purpose, as nobody will be able to use the protocol that way on shared
HTTP ports. Then let's go on with the framing protocol alone without the
fake initial handshake and let's have another draft later suggest how to
use WS over HTTP as a standard protocol Upgrade request.

Regards,
Willy