Re: [hybi] Why HTTP Compliant

"Simon Pieters" <simonp@opera.com> Tue, 01 June 2010 13:04 UTC

Return-Path: <simonp@opera.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 D3EC33A6818 for <hybi@core3.amsl.com>; Tue, 1 Jun 2010 06:04:52 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.999
X-Spam-Level:
X-Spam-Status: No, score=-3.999 tagged_above=-999 required=5 tests=[BAYES_50=0.001, RCVD_IN_DNSWL_MED=-4]
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 1QjubtncxWQB for <hybi@core3.amsl.com>; Tue, 1 Jun 2010 06:04:51 -0700 (PDT)
Received: from smtp.opera.com (smtp.opera.com [213.236.208.81]) by core3.amsl.com (Postfix) with ESMTP id 898D63A6934 for <hybi@ietf.org>; Tue, 1 Jun 2010 06:04:51 -0700 (PDT)
Received: from simon-pieterss-macbook.local (c-1799e355.410-6-64736c14.cust.bredbandsbolaget.se [85.227.153.23]) (authenticated bits=0) by smtp.opera.com (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id o51D4bdm025243 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 1 Jun 2010 13:04:38 GMT
Content-Type: text/plain; charset="utf-8"; format="flowed"; delsp="yes"
To: hybi <hybi@ietf.org>, Greg Wilkins <gregw@webtide.com>
References: <AANLkTikzNjRse7cK8hl7eX0zWL3xP0xgbGTV8hz8RruH@mail.gmail.com>
Date: Tue, 01 Jun 2010 15:04:36 +0200
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
From: Simon Pieters <simonp@opera.com>
Message-ID: <op.vdmg9uenidj3kv@simon-pieterss-macbook.local>
In-Reply-To: <AANLkTikzNjRse7cK8hl7eX0zWL3xP0xgbGTV8hz8RruH@mail.gmail.com>
User-Agent: Opera Mail/10.53 (MacIntel)
Subject: Re: [hybi] Why HTTP Compliant
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, 01 Jun 2010 13:04:52 -0000

On Tue, 01 Jun 2010 13:39:23 +0200, Greg Wilkins <gregw@webtide.com> wrote:

> Ian has frequently said that HTTP Compliance is just a desire for  
> theoretical
> purity.
>
> But lack of HTTP compliance is causing me almost daily head aches with
> our websocket work.
>
> We are now supporting websocket in the cometd2 framework, and it is
> working with both
> -75 and -76 clients.
>
> However, we also sometimes use a cross origin access control filter
> that supports normal
> long polling to the same cometd server from different origins without
> the need for json callbacks
> etc.
>
> This filter follows the cross origin specification and sets the
>     Access-Control-Allow-Origin
> on HTTP responses, which of course breaks the websocket handshake.
>
> So we now have to modify this  filter to have
>
>   if (!websocket)
>   {
>     ...
>   }
>
> Easy enough to do, but the filter comes from a different project and and  
> in a
> stable release.   Luckily it is open source.     So now while the fix is  
> simple,
> i have to break encapsulation of websocket concerns and update another
> project (or copy/modify code).
>
> There are just going to be endless issues like this.
>
> The handshake should just ignore arbitrary unknown headers rather
> than breaking.
>
> This is NOT a theoretical issue.

The client is required to ignore unknown headers in the handshake (at  
least in -76, I don't know about -75):

[[
41. ... handle each entry in the fields list as follows:
...
↪Any other name
Ignore it.
]]

-- 
Simon Pieters
Opera Software