Re: [hybi] WebSocket -76 is incompatible with HTTP reverse proxies

Willy Tarreau <w@1wt.eu> Wed, 07 July 2010 05:31 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 61B143A6893 for <hybi@core3.amsl.com>; Tue, 6 Jul 2010 22:31:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.951
X-Spam-Level:
X-Spam-Status: No, score=-1.951 tagged_above=-999 required=5 tests=[AWL=0.092, 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 xPzmzaVJ0vTK for <hybi@core3.amsl.com>; Tue, 6 Jul 2010 22:31:31 -0700 (PDT)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by core3.amsl.com (Postfix) with ESMTP id DCE0D3A687B for <hybi@ietf.org>; Tue, 6 Jul 2010 22:31:24 -0700 (PDT)
Date: Wed, 7 Jul 2010 07:31:17 +0200
From: Willy Tarreau <w@1wt.eu>
To: "Thomson, Martin" <Martin.Thomson@andrew.com>
Message-ID: <20100707053117.GJ12126@1wt.eu>
References: <20100706210039.GA12167@1wt.eu> <B709B846-2A8C-4B84-8F4D-B06B81D91A7B@brandedcode.com> <20100707044129.GH12126@1wt.eu> <AANLkTik-i_9a7JpaFRqPLBr68buPM5Ml3N1iabaJby8k@mail.gmail.com> <8B0A9FCBB9832F43971E38010638454F03E9DCCA29@SISPE7MB1.commscope.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <8B0A9FCBB9832F43971E38010638454F03E9DCCA29@SISPE7MB1.commscope.com>
User-Agent: Mutt/1.5.20 (2009-06-14)
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] WebSocket -76 is incompatible with HTTP reverse proxies
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: Wed, 07 Jul 2010 05:31:41 -0000

On Wed, Jul 07, 2010 at 01:23:22PM +0800, Thomson, Martin wrote:
> 
> > Content-length: 0 also makes sense but it means that the nonce will
> > be sent *after* the handshake, which means we'd have a second
> > round-trip. 
> 
> The round-trip thing is a fallacy.  Just as you can pipeline requests, so can you send extra handshakey parts after the headers.
> 
> Solution:  The handshake includes a complete HTTP message, PLUS extra stuff.  All of this is sent at once, but the HTTP stuff stops half way.
> 
> This is only true if the extra stuff is dependent on information from the peer, which is not the case in this scenario.

You're perfectly right Martin, this was a stupid comment of mine in fact.
The extra round-trip will only be between the reverse proxy and the server,
which is not a problem since both are supposed to be very close one to the
other. So, let's have content-length: 0 in both directions and have the
nonce transported *after* the handshake and tested by the client.

Willy