Re: [hybi] Client offers invalid WS protocols, what must the server do? 101???

Iñaki Baz Castillo <ibc@aliax.net> Thu, 01 September 2011 07:18 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 BD02721F8AEA for <hybi@ietfa.amsl.com>; Thu, 1 Sep 2011 00:18:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.643
X-Spam-Level:
X-Spam-Status: No, score=-2.643 tagged_above=-999 required=5 tests=[AWL=0.034, 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 lRXMw2xPuGlW for <hybi@ietfa.amsl.com>; Thu, 1 Sep 2011 00:18:50 -0700 (PDT)
Received: from mail-qy0-f179.google.com (mail-qy0-f179.google.com [209.85.216.179]) by ietfa.amsl.com (Postfix) with ESMTP id 1CA0421F8AE9 for <hybi@ietf.org>; Thu, 1 Sep 2011 00:18:50 -0700 (PDT)
Received: by qyk35 with SMTP id 35so954079qyk.10 for <hybi@ietf.org>; Thu, 01 Sep 2011 00:20:22 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.229.19.66 with SMTP id z2mr1027237qca.160.1314861622059; Thu, 01 Sep 2011 00:20:22 -0700 (PDT)
Received: by 10.229.219.141 with HTTP; Thu, 1 Sep 2011 00:20:21 -0700 (PDT)
In-Reply-To: <CAE8AN_URa2RvhmF50cAH4GLNm76WN6REkJYu6uEv-jEXzF=MBg@mail.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> <4E5E79C4.2080100@callenish.com> <CAMaigVkreB5P2ieXJxZbQ3yPZs0kwmJmqvA0t0jHMBA40BjF-Q@mail.gmail.com> <CALiegfmi3et2==qziAg1toWHjkiBAUrLfQDPmEKuU+Jx_D6ZTQ@mail.gmail.com> <CABLsOLC0m-NpG6L-95rju3vLinMa3d8b3pncoM53fkoN+xs3Fg@mail.gmail.com> <CALiegfkYc=S2-Ljc3Tvy+28EjiHSHv5GrDk4aAQi8q=aQjRV1Q@mail.gmail.com> <4E5E94D8.4070302@gmail.com> <CAE8AN_URa2RvhmF50cAH4GLNm76WN6REkJYu6uEv-jEXzF=MBg@mail.gmail.com>
Date: Thu, 01 Sep 2011 09:20:21 +0200
Message-ID: <CALiegf=6RYY20x8sfJzFcOBqS6p9_jFBXhOsXC416e17jK2Q3Q@mail.gmail.com>
From: Iñaki Baz Castillo <ibc@aliax.net>
To: Brian <theturtle32@gmail.com>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Cc: Hybi <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: Thu, 01 Sep 2011 07:18:50 -0000

2011/8/31 Brian <theturtle32@gmail.com>:
> there's no
> acceptable use case for the server to accept the connection with a
> subprotocol not contained in the list of subprotocols requested by the
> client.  If the client requests a list of subprotocols, that is to be taken
> as the canonical list of the only subprotocols it knows how to speak.
>  Anything else will fail.  It should respond with a 4xx HTTP error code.

And such 4xx code should be good enough and specified for this case.
In this way, the WS client could warn the user (the humar user) in
some way in case the server rejects the connection with that 4xx code
("the version of your software is not updated" or whatever).



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