Re: [hybi] Client offers invalid WS protocols, what must the server do? 101???
Bruce Atherton <bruce@callenish.com> Wed, 31 August 2011 18:11 UTC
Return-Path: <bruce@callenish.com>
X-Original-To: hybi@ietfa.amsl.com
Delivered-To: hybi@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 7BF6421F8E6D for <hybi@ietfa.amsl.com>; Wed, 31 Aug 2011 11:11:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.533
X-Spam-Level:
X-Spam-Status: No, score=-2.533 tagged_above=-999 required=5 tests=[AWL=0.067, BAYES_00=-2.599]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sOKqzpuPlEIn for <hybi@ietfa.amsl.com>; Wed, 31 Aug 2011 11:11:57 -0700 (PDT)
Received: from biz82.inmotionhosting.com (biz82.inmotionhosting.com [74.124.202.87]) by ietfa.amsl.com (Postfix) with ESMTP id 9A1C821F8E6B for <hybi@ietf.org>; Wed, 31 Aug 2011 11:11:57 -0700 (PDT)
Received: from [24.108.144.160] (helo=[192.168.145.11]) by biz82.inmotionhosting.com with esmtpa (Exim 4.69) (envelope-from <bruce@callenish.com>) id 1QypHz-00017m-6b; Wed, 31 Aug 2011 11:13:27 -0700
Message-ID: <4E5E79C4.2080100@callenish.com>
Date: Wed, 31 Aug 2011 11:13:24 -0700
From: Bruce Atherton <bruce@callenish.com>
User-Agent: Mozilla/5.0 (Windows NT 6.0; WOW64; rv:6.0) Gecko/20110812 Thunderbird/6.0
MIME-Version: 1.0
To: Philipp Serafin <phil127@gmail.com>
References: <CALiegfkC9dLOnLfSQApE9OjoSV1RXT7cTumZ6+yCR1tWo_cvmw@mail.gmail.com> <4E5CBEA0.2080605@isode.com> <CALiegfn3dPyZMR3ZZ3CtwOeAmC4sxd0=kos4Z82B2qeh_aZASQ@mail.gmail.com> <4E5CC6A7.7030304@isode.com> <CALiegfnc-YRPZZvgJjmvtafKnkJB7rXJ9KcPDKL-ceeAdwGEGQ@mail.gmail.com> <4E5CC8B8.7090702@isode.com> <CALiegfmSs-FhS5AuJHWFhGdbxS4pLSHA1Kk2y_P5GwwG_YneyQ@mail.gmail.com> <CABLsOLCBSnW+R9vr=RbRosTo55tv-_gG9yLdoj5AqW4rU6rcPQ@mail.gmail.com> <4E5D04F8.30801@isode.com> <4E5E5EDA.6000606@gmail.com>
In-Reply-To: <4E5E5EDA.6000606@gmail.com>
Content-Type: text/plain; charset="UTF-8"; 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
Cc: hybi@ietf.org
Subject: Re: [hybi] Client offers invalid WS protocols, what must the server do? 101???
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/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, 31 Aug 2011 18:11:58 -0000
On 31/08/2011 9:18 AM, Philipp Serafin wrote: > I agree with Inaki that an error code for unsupported subprotocols would > be useful. But I think it would be cleaner if the server would send it > right as part of the handshake instead of the client. > > So far it looks to me as if WS connections that make use of sub > protocols serve completely different use cases than those that don't. > > On the one hand, we have proprietary, "internal" endpoints that will > solely be implementation details of a web application. The actual > protocol used on top of WS will be tailor-made to that specific > web-application and may change any time without notice. In fact, the > application might even switch to a completely different technology than > WS any time. Both WS client and server will be controlled by the same > developers. > As defining a formal subprotocol in such a case doesn't make much sense, > the protocol header will likely not be used. I think your analysis is mixing a few concerns. To me, there are two questions to answer when considering this issue: Is the subprotocol custom or standard? Is it running on an application-specific endpoint or a standard browser/server? When both the subprotocol and the endpoints are custom, there are still benefits to using the subprotocol field. It allows versioning, for example. It also allows you to limit the subprotocols used at the endpoints so you can support things like pricing based on subprotocols deployed to a particular customer. When the subprotocol is custom and the endpoints are standard, then a subprotocol layers on top of the default subprotocol. This may be useful if, for example, you want to deploy a vendor's widget that uses Websockets to your page. It allows your server to implement the specific protocol for talking to the widget. And consider if you had multiple widgets each from a different vendor on the same page. I would think that browsers will deal with an attempt to open multiple connections to the same URL with different subprotocols by MUXing them. I could be wrong about that, but it would provide a nice mechanism for dealing with the multiple vendor problem. When the subprotocol is standard and one of the endpoints is custom, there is still a benefit to specifying a subprotocol as it enhances the chances of interoperability with other implementations. When both the subprotocol and the endpoints are standard, right now it is the same as when the subprotocol is custom. But in the future, browsers and servers may provide architectures for extending the subprotocols they support. Imagine tunneling SIP and RTP over Websockets so that everyone visiting a particular web page was given the option of joining a conference call. That may be a useful enough feature that eventually browsers actually include support for the SIP and RTP subprotocols natively. Regarding the server sending the error code, that would eliminate the ability for a client to fall back to the raw binary/text subprotocol if the server doesn't support any of the specific subprotocols. I don't think that is a good idea.
- [hybi] Client offers invalid WS protocols, what m… Iñaki Baz Castillo
- Re: [hybi] Client offers invalid WS protocols, wh… Alexey Melnikov
- Re: [hybi] Client offers invalid WS protocols, wh… Alexey Melnikov
- Re: [hybi] Client offers invalid WS protocols, wh… Iñaki Baz Castillo
- Re: [hybi] Client offers invalid WS protocols, wh… Iñaki Baz Castillo
- Re: [hybi] Client offers invalid WS protocols, wh… Alexey Melnikov
- Re: [hybi] Client offers invalid WS protocols, wh… Iñaki Baz Castillo
- Re: [hybi] Client offers invalid WS protocols, wh… John Tamplin
- Re: [hybi] Client offers invalid WS protocols, wh… Alexey Melnikov
- Re: [hybi] Client offers invalid WS protocols, wh… Philipp Serafin
- Re: [hybi] Client offers invalid WS protocols, wh… Iñaki Baz Castillo
- Re: [hybi] Client offers invalid WS protocols, wh… Bruce Atherton
- Re: [hybi] Client offers invalid WS protocols, wh… Iñaki Baz Castillo
- Re: [hybi] Client offers invalid WS protocols, wh… Philipp Serafin
- Re: [hybi] Client offers invalid WS protocols, wh… Iñaki Baz Castillo
- Re: [hybi] Client offers invalid WS protocols, wh… John Tamplin
- Re: [hybi] Client offers invalid WS protocols, wh… Iñaki Baz Castillo
- Re: [hybi] Client offers invalid WS protocols, wh… Philipp Serafin
- Re: [hybi] Client offers invalid WS protocols, wh… John Tamplin
- Re: [hybi] Client offers invalid WS protocols, wh… Philipp Serafin
- Re: [hybi] Client offers invalid WS protocols, wh… Iñaki Baz Castillo
- Re: [hybi] Client offers invalid WS protocols, wh… Brian
- Re: [hybi] Client offers invalid WS protocols, wh… Joel Martin
- Re: [hybi] Client offers invalid WS protocols, wh… Brian
- Re: [hybi] Client offers invalid WS protocols, wh… Iñaki Baz Castillo
- Re: [hybi] Client offers invalid WS protocols, wh… Iñaki Baz Castillo