Re: [hybi] Comments about draft-13

Iñaki Baz Castillo <ibc@aliax.net> Thu, 08 September 2011 09:11 UTC

Return-Path: <ibc@aliax.net>
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 4B05F21F8B1F for <hybi@ietfa.amsl.com>; Thu, 8 Sep 2011 02:11:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.647
X-Spam-Level:
X-Spam-Status: No, score=-2.647 tagged_above=-999 required=5 tests=[AWL=0.030, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
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 V3aSeWD3f6HU for <hybi@ietfa.amsl.com>; Thu, 8 Sep 2011 02:11:54 -0700 (PDT)
Received: from mail-qw0-f51.google.com (mail-qw0-f51.google.com [209.85.216.51]) by ietfa.amsl.com (Postfix) with ESMTP id A1E6821F8B08 for <hybi@ietf.org>; Thu, 8 Sep 2011 02:11:54 -0700 (PDT)
Received: by qwm25 with SMTP id 25so446821qwm.38 for <hybi@ietf.org>; Thu, 08 Sep 2011 02:13:46 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.229.47.129 with SMTP id n1mr304078qcf.215.1315473226016; Thu, 08 Sep 2011 02:13:46 -0700 (PDT)
Received: by 10.229.79.207 with HTTP; Thu, 8 Sep 2011 02:13:45 -0700 (PDT)
In-Reply-To: <4E67FD5A.4050308@isode.com>
References: <CALiegfkUMDfuRC+16ZcLo__2OqAcQ1UVDGa_610ykEAe6yZViw@mail.gmail.com> <CALiegf=wO6w5UMLO-hsn8o0cX3__SuxMDrgqvScuS6QWdNhptw@mail.gmail.com> <4E67FD5A.4050308@isode.com>
Date: Thu, 08 Sep 2011 11:13:45 +0200
Message-ID: <CALiegfn63u7ZFSZwPGVHDEZ8i36OgZvF1SKnysiVZDoKSj9R=A@mail.gmail.com>
From: Iñaki Baz Castillo <ibc@aliax.net>
To: Alexey Melnikov <alexey.melnikov@isode.com>
Content-Type: text/plain; charset="UTF-8"
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: Thu, 08 Sep 2011 09:11:55 -0000

2011/9/8 Alexey Melnikov <alexey.melnikov@isode.com>:
>> 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.

No, the client cannot close the connection because the server replied
488 so there is no established WS 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.

This is a negotiation. If Client wants to speak "foo" or "bar" but the
server does not support any of them, the server should reply 488 (such
response could/MUST include a Sec-WebSocket-Protocol with the
subprotocols the server supports).

I see no reason for the server to reply 101 in the case it does not
support any subprotocol offered by the client.



-- 
Iñaki Baz Castillo
<ibc@aliax.net>