Re: [hybi] Comments about draft-13

Alexey Melnikov <alexey.melnikov@isode.com> Wed, 07 September 2011 23:23 UTC

Return-Path: <alexey.melnikov@isode.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 2900321F8D4A for <hybi@ietfa.amsl.com>; Wed, 7 Sep 2011 16:23:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.413
X-Spam-Level:
X-Spam-Status: No, score=-102.413 tagged_above=-999 required=5 tests=[AWL=-0.114, BAYES_00=-2.599, MIME_8BIT_HEADER=0.3, USER_IN_WHITELIST=-100]
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 3xv5djGWppv6 for <hybi@ietfa.amsl.com>; Wed, 7 Sep 2011 16:23:31 -0700 (PDT)
Received: from rufus.isode.com (rufus.isode.com [62.3.217.251]) by ietfa.amsl.com (Postfix) with ESMTP id 3CD0121F8CA2 for <hybi@ietf.org>; Wed, 7 Sep 2011 16:23:31 -0700 (PDT)
Received: from [188.29.171.103] (188.29.171.103.threembb.co.uk [188.29.171.103]) by rufus.isode.com (submission channel) via TCP with ESMTPA id <Tmf9XQAZ1D0g@rufus.isode.com>; Thu, 8 Sep 2011 00:25:20 +0100
Message-ID: <4E67FD5A.4050308@isode.com>
Date: Thu, 08 Sep 2011 00:25:14 +0100
From: Alexey Melnikov <alexey.melnikov@isode.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915
X-Accept-Language: en-us, en
To: Iñaki Baz Castillo <ibc@aliax.net>
References: <CALiegfkUMDfuRC+16ZcLo__2OqAcQ1UVDGa_610ykEAe6yZViw@mail.gmail.com> <CALiegf=wO6w5UMLO-hsn8o0cX3__SuxMDrgqvScuS6QWdNhptw@mail.gmail.com>
In-Reply-To: <CALiegf=wO6w5UMLO-hsn8o0cX3__SuxMDrgqvScuS6QWdNhptw@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-transfer-encoding: quoted-printable
Cc: hybi@ietf.org
Subject: Re: [hybi] Comments about draft-13
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, 07 Sep 2011 23:23:32 -0000

Hi Iñaki,

Iñaki Baz Castillo wrote:

>2011/9/2 Iñaki Baz Castillo <ibc@aliax.net>:
>  
>
>>3) Section 4.2.2 does include nothing about a 4XX HTTP response code
>>for the case in which the WS clients offers N WS subprotocols and the
>>server supports no one of them. Current text states that the server
>>MUST reply 101 without Sec-WebSocket-Protocol, so the client would
>>then MUST Fail_The_Connection.
>>
>>There has been a long thread recently suggesting that in that case
>>(and just in *that* case) the server whould *reject* the GET request
>>with a *specific* HTTP status code which would mean "I don't support
>>any of your suggested WS protocols, so I cannot accept the WS session
>>because I have no idea what we are supposed to speak".
>>
>>This is a new protocol, so feel *free* to create a new "HTTP" response
>>code for this case, maybe:
>>
>> 488 WebSocket SubProtocol Not Supported
>>
>>As I explained in other thread, this status code could help the human
>>user and the client application developer to realize that his software
>>is not up-to-date with the service requeriments ("your programm is too
>>old, upgrade please").
>>    
>>
>
>
>Hi, any new consideration about this?
>Thanks a lot.
>
After thinking more about this: I would prefer to leave the current 
behaviour as is:

C: I would like to use either subprotocol "foo" or "bar"
S: 101 (WebSocket handshake), but speak neither

at this point the client can decide to close the connection, or decide 
that it can cope with lack of the subprotocols.

You propose:
C: I would like to use either subprotocol "foo" or "bar"
S: 488 speak neither

At this point if the client can cope with lack of support for both "foo" 
and "bar", it has to redo the handshake without mentioning them.
Otherwise it can close the connection.

I don't think there is a significant difference between 2 cases: the 
number of round trips is the same and the same behaviour can be achieved 
easily in either case.

I would also like to keep handling of subprotocols the same as handling 
of extensions, i.e. client can always list them as optional for the 
server to handle.