Re: [hybi] Why HTTP Compliant

Bruce Atherton <bruce@callenish.com> Sat, 05 June 2010 02:39 UTC

Return-Path: <bruce@callenish.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 853663A686C for <hybi@core3.amsl.com>; Fri, 4 Jun 2010 19:39:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.001
X-Spam-Level:
X-Spam-Status: No, score=0.001 tagged_above=-999 required=5 tests=[BAYES_50=0.001]
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 u0BN4DE4mkOv for <hybi@core3.amsl.com>; Fri, 4 Jun 2010 19:39:16 -0700 (PDT)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by core3.amsl.com (Postfix) with ESMTP id AB5683A67F9 for <hybi@ietf.org>; Fri, 4 Jun 2010 19:39:16 -0700 (PDT)
Received: from s01060030bd9c57c9.vc.shawcable.net ([96.49.82.98] helo=[192.168.2.5]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1OKjHn-0002KO-Ke for hybi@ietf.org; Fri, 04 Jun 2010 19:38:59 -0700
Message-ID: <4C09B8E1.3000402@callenish.com>
Date: Fri, 04 Jun 2010 19:39:29 -0700
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4
MIME-Version: 1.0
To: hybi@ietf.org
References: <AANLkTikzNjRse7cK8hl7eX0zWL3xP0xgbGTV8hz8RruH@mail.gmail.com> <op.vdmg9uenidj3kv@simon-pieterss-macbook.local> <AANLkTil1gofHSKy1laRnudnZePhuDnAP53OZrq_b-kR5@mail.gmail.com> <op.vdnymobmidj3kv@simon-pieterss-macbook.local>
In-Reply-To: <op.vdnymobmidj3kv@simon-pieterss-macbook.local>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - biz82.inmotionhosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - callenish.com
X-Source:
X-Source-Args:
X-Source-Dir:
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: Sat, 05 Jun 2010 02:39:17 -0000

I am neither a browser developer or a server developer, so I may just be 
missing something. But I have to say that the current debate 
flabbergasts me. Here is my understanding of what you would have to do 
to write a server that can handle both HTTP and Websockets if you change 
the -00 spec so it didn't stay HTTP compliant until you upgrade the 
connection:

     -> GET /demo HTTP/1.1   # Claim is made that this is an HTTP 1.1 
compliant client

     server: Ok, I'll go into my HTTP handling code and treat this as an 
HTTP request

     -> Garbage Data  # Client was lying, it is really some other protocol

      server: This may be a bad HTTP request (which means I should throw 
an exception to go to my error handling code), but on the other hand 
maybe the client is a liar and this is some other protocol I support. If 
so, I need to keep this garbage data in case it is needed by the real 
protocol. How much data? Can't just store it all as that could lead to a 
DOS. So the HTTP handling code needs to know about other protocols like 
Websocket, and keep track of as much data as it may need. It may also 
improve performance to know about the configuration of other parts of 
the server, in case lying protocols like Websocket aren't deployed on 
this instance, in which case I can go to the error handling code 
immediately.

Really? You guys are writing a standard for a protocol, and you think it 
makes sense to require the client to lie about the protocol it talks? 
This goes beyond ironic and into surreal territory.

But you guys are smart, so maybe I am just missing something. Maybe 
writing server and proxy code really wouldn't be as insanely complicated 
as it looks like it would be. Maybe having lying clients is a really 
good idea. I sure don't see it, though.

On 02/06/2010 1:17 AM, Simon Pieters wrote:
> On Tue, 01 Jun 2010 17:04:55 +0200, Greg Wilkins <gregw@webtide.com> 
> wrote:
>
>> (gee a
>> ws version  string or user-agent header would be really really 
>> useful!!!!!!)
>
> I don't see how it would help you in this case.
>

Because writing code that can choose between dealing with A or B is much 
simpler and cleaner than code that has to handle both A and B without 
knowing which it is handling. See above.