Re: [hybi] WebSocket -76 is incompatible with HTTP reverse proxies
"Thomson, Martin" <Martin.Thomson@andrew.com> Wed, 07 July 2010 22:38 UTC
Return-Path: <Martin.Thomson@andrew.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 473183A697A for <hybi@core3.amsl.com>; Wed, 7 Jul 2010 15:38:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.123
X-Spam-Level:
X-Spam-Status: No, score=-2.123 tagged_above=-999 required=5 tests=[AWL=0.476, 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 UopeEu7gIc2t for <hybi@core3.amsl.com>; Wed, 7 Jul 2010 15:38:17 -0700 (PDT)
Received: from csmailgw2.commscope.com (csmailgw2.commscope.com [198.135.207.242]) by core3.amsl.com (Postfix) with ESMTP id 9A5D33A68E7 for <hybi@ietf.org>; Wed, 7 Jul 2010 15:38:17 -0700 (PDT)
Received: from [10.86.20.102] ([10.86.20.102]:3650 "EHLO ACDCE7HC1.commscope.com") by csmailgw2.commscope.com with ESMTP id S335839Ab0GGWiU (ORCPT <rfc822; hybi@ietf.org>); Wed, 7 Jul 2010 17:38:20 -0500
Received: from SISPE7HC2.commscope.com (10.97.4.13) by ACDCE7HC1.commscope.com (10.86.20.102) with Microsoft SMTP Server (TLS) id 8.1.436.0; Wed, 7 Jul 2010 17:38:20 -0500
Received: from SISPE7MB1.commscope.com ([fe80::9d82:a492:85e3:a293]) by SISPE7HC2.commscope.com ([fe80::58c3:2447:f977:57c3%10]) with mapi; Thu, 8 Jul 2010 06:38:18 +0800
From: "Thomson, Martin" <Martin.Thomson@andrew.com>
To: Greg Wilkins <gregw@webtide.com>
Date: Thu, 08 Jul 2010 06:40:20 +0800
Thread-Topic: [hybi] WebSocket -76 is incompatible with HTTP reverse proxies
Thread-Index: Acsd5UshXq8Mp9iIR7+KmX95gZW/pgAP97RA
Message-ID: <8B0A9FCBB9832F43971E38010638454F03E9DCCAD4@SISPE7MB1.commscope.com>
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> <AANLkTima-dMQjX7S0WURFPrY--bTJJUs9PZcd4bNmNdW@mail.gmail.com>
In-Reply-To: <AANLkTima-dMQjX7S0WURFPrY--bTJJUs9PZcd4bNmNdW@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: en-US
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-BCN: Meridius 1000 Version 3.4 on csmailgw2.commscope.com
X-BCN-Sender: Martin.Thomson@andrew.com
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 22:38:19 -0000
That's reasonable. The alternative is to have Content-Length set to the length of the extra stuff - make the extra handshake stuff part of the message body. That pulls it up into the HTTP. That only applies on the request - the response to a successful handshake can do anything it likes once the HTTP part is out of the way. > -----Original Message----- > From: Greg Wilkins [mailto:gregw@webtide.com] > Sent: Thursday, 8 July 2010 1:02 AM > To: Thomson, Martin > Cc: Roberto Peon; Willy Tarreau; hybi@ietf.org > Subject: Re: [hybi] WebSocket -76 is incompatible with HTTP reverse > proxies > > Martin, > > You are correct that it is not an extra round trip. But I do not > think it is a good solution to send a complete HTTP message PLUS extra > stuff in the request. > > If the handshake is legal HTTP, the server should be able to rejects > the websocket upgrade without closing the connection. This would > allow the connection to remain in the browsers pool of connections and > avoid an extra round trip to establish another connection if the > application falls back to non-websocket transports. > > Sending extra stuff after the response is OK. > > cheers > > > > > > > > On 7 July 2010 15:23, Thomson, Martin <Martin.Thomson@andrew.com> > 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. > > _______________________________________________ > > hybi mailing list > > hybi@ietf.org > > https://www.ietf.org/mailman/listinfo/hybi > >
- Re: [hybi] WebSocket -76 is incompatible with HTT… Willy Tarreau
- [hybi] WebSocket -76 is incompatible with HTTP re… Willy Tarreau
- Re: [hybi] WebSocket -76 is incompatible with HTT… Greg Wilkins
- Re: [hybi] WebSocket -76 is incompatible with HTT… Micheil Smith
- Re: [hybi] WebSocket -76 is incompatible with HTT… Willy Tarreau
- Re: [hybi] WebSocket -76 is incompatible with HTT… Roberto Peon
- Re: [hybi] WebSocket -76 is incompatible with HTT… Thomson, Martin
- Re: [hybi] WebSocket -76 is incompatible with HTT… Willy Tarreau
- Re: [hybi] WebSocket -76 is incompatible with HTT… Greg Wilkins
- Re: [hybi] WebSocket -76 is incompatible with HTT… Thomson, Martin
- Re: [hybi] WebSocket -76 is incompatible with HTT… Ian Hickson
- Re: [hybi] WebSocket -76 is incompatible with HTT… Willy Tarreau