Re: [hybi] #1: HTTP Compliance

Ian Hickson <ian@hixie.ch> Tue, 18 May 2010 02:39 UTC

Return-Path: <ian@hixie.ch>
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 892FE3A6A7F for <hybi@core3.amsl.com>; Mon, 17 May 2010 19:39:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.162
X-Spam-Level:
X-Spam-Status: No, score=-1.162 tagged_above=-999 required=5 tests=[AWL=-0.052, BAYES_05=-1.11]
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 VkMZw8++z5y2 for <hybi@core3.amsl.com>; Mon, 17 May 2010 19:39:48 -0700 (PDT)
Received: from looneymail-a1.g.dreamhost.com (caibbdcaaaaf.dreamhost.com [208.113.200.5]) by core3.amsl.com (Postfix) with ESMTP id 30C9A3A6837 for <hybi@ietf.org>; Mon, 17 May 2010 19:39:44 -0700 (PDT)
Received: from ps20323.dreamhostps.com (ps20323.dreamhost.com [69.163.222.251]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by looneymail-a1.g.dreamhost.com (Postfix) with ESMTP id A72F415D79A; Mon, 17 May 2010 19:39:36 -0700 (PDT)
Date: Tue, 18 May 2010 02:39:36 +0000
From: Ian Hickson <ian@hixie.ch>
To: Jamie Lokier <jamie@shareable.org>
In-Reply-To: <20100518003753.GP20356@shareable.org>
Message-ID: <Pine.LNX.4.64.1005180229430.22838@ps20323.dreamhostps.com>
References: <068.d07026741c6694cd80652d2a7d34f236@tools.ietf.org> <4BF106AD.6020506@webtide.com> <Pine.LNX.4.64.1005170918310.25609@ps20323.dreamhostps.com> <4BF11920.2080307@webtide.com> <Pine.LNX.4.64.1005171039050.25609@ps20323.dreamhostps.com> <4BF12FF1.2020101@webtide.com> <15307.1274106895.116423@Sputnik> <Pine.LNX.4.64.1005172259030.22838@ps20323.dreamhostps.com> <20100518003753.GP20356@shareable.org>
Content-Language: en-GB-hixie
Content-Style-Type: text/css
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset="US-ASCII"
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] #1: HTTP Compliance
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, 18 May 2010 02:39:49 -0000

On Tue, 18 May 2010, Jamie Lokier wrote:
> > On Mon, 17 May 2010, Dave Cridland wrote:
> > > a desktop client might initiate a session with an HTTP service 
> > > without knowing a priori if it's an HTTP or WebSocket service.
>
> For example, a social networking client running in a browser, designed 
> to fetch feed information from numerous different services from other 
> providers (imagine Yahoo, Facebook, Twitter etc.), those services 
> running a variety of feed protocols over WebSocket.
> 
> When the user is given a URL for a third party bidirectional service, 
> the client tries WebSocket subprotocol A first, then WebSocket 
> subprotocol B, then C, then a HTTP hanging-GET equivalent.

Since a Web Socket URL starts with "ws" and an HTTP URL starts with 
"http", I don't think that's a realistic scenario.

Furthermore, if a script really did do this (e.g. because it was given 
just a domain name, not a URL), then it would use the WebSocket object to 
open the Web Socket connection, and XMLHttpRequest to open the HTTP 
connection, and they would be separate connections -- at no point would 
the client open a connection without knowing whether it's expecting HTTP 
or Web Socket, as Dave suggested.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'