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

Greg Wilkins <gregw@webtide.com> Wed, 07 July 2010 15:01 UTC

Return-Path: <gregw@webtide.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 D907F3A67AB for <hybi@core3.amsl.com>; Wed, 7 Jul 2010 08:01:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.677
X-Spam-Level:
X-Spam-Status: No, score=-0.677 tagged_above=-999 required=5 tests=[AWL=1.300, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622]
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 s6TgYfT-Tz7T for <hybi@core3.amsl.com>; Wed, 7 Jul 2010 08:01:31 -0700 (PDT)
Received: from mail-fx0-f44.google.com (mail-fx0-f44.google.com [209.85.161.44]) by core3.amsl.com (Postfix) with ESMTP id 914D53A67B4 for <hybi@ietf.org>; Wed, 7 Jul 2010 08:01:31 -0700 (PDT)
Received: by fxm1 with SMTP id 1so5960387fxm.31 for <hybi@ietf.org>; Wed, 07 Jul 2010 08:01:31 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.223.105.70 with SMTP id s6mr5826033fao.67.1278514891293; Wed, 07 Jul 2010 08:01:31 -0700 (PDT)
Received: by 10.223.119.140 with HTTP; Wed, 7 Jul 2010 08:01:31 -0700 (PDT)
In-Reply-To: <8B0A9FCBB9832F43971E38010638454F03E9DCCA29@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>
Date: Thu, 8 Jul 2010 01:01:31 +1000
Message-ID: <AANLkTima-dMQjX7S0WURFPrY--bTJJUs9PZcd4bNmNdW@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: "Thomson, Martin" <Martin.Thomson@andrew.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
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 15:01:33 -0000

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
>