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

Brian <theturtle32@gmail.com> Thu, 01 September 2011 00:05 UTC

Return-Path: <theturtle32@gmail.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 61E9D21F8D63 for <hybi@ietfa.amsl.com>; Wed, 31 Aug 2011 17:05:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.482
X-Spam-Level:
X-Spam-Status: No, score=-3.482 tagged_above=-999 required=5 tests=[AWL=0.116, BAYES_00=-2.599, HTML_MESSAGE=0.001, 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 cLvXa90HiTS5 for <hybi@ietfa.amsl.com>; Wed, 31 Aug 2011 17:05:25 -0700 (PDT)
Received: from mail-bw0-f44.google.com (mail-bw0-f44.google.com [209.85.214.44]) by ietfa.amsl.com (Postfix) with ESMTP id 5AD5121F8D62 for <hybi@ietf.org>; Wed, 31 Aug 2011 17:05:25 -0700 (PDT)
Received: by bkar4 with SMTP id r4so1639719bka.31 for <hybi@ietf.org>; Wed, 31 Aug 2011 17:06:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=jpGVCnYAvNkcu8M8H/0SfzgKeWO7mdH8YXWV/aqNOvQ=; b=gUVnEFlrd/20RuMZr1VHCHEymnxxjXNvSgRsjTMlb9852bDt+Q0YPONOm6Z6Fgeblq +IQlgoRyZ+nf92ZdNQ6oIHKoFb9HdFzgIhi1p+grEHwQtnyh10bPUsjpq0WUjYe+x5f9 W7vKAFpRRAPiULOl7S6wZieBuq0MZWnWRyxpc=
MIME-Version: 1.0
Received: by 10.204.133.18 with SMTP id d18mr556778bkt.76.1314835616262; Wed, 31 Aug 2011 17:06:56 -0700 (PDT)
Received: by 10.204.150.72 with HTTP; Wed, 31 Aug 2011 17:06:56 -0700 (PDT)
In-Reply-To: <CAO228Nt=wSUsV5JH9B3VxOzkn1e0aayjw37ScRMne9fBU-aDJQ@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> <CAO228Nt=wSUsV5JH9B3VxOzkn1e0aayjw37ScRMne9fBU-aDJQ@mail.gmail.com>
Date: Wed, 31 Aug 2011 17:06:56 -0700
Message-ID: <CAE8AN_Wa5Lsaso_Nd9xXF-4xydMVBbMjLsws9eY24FuvX-oc_g@mail.gmail.com>
From: Brian <theturtle32@gmail.com>
To: Joel Martin <hybi@martintribe.org>
Content-Type: multipart/alternative; boundary="001517477f36d868ac04abd605e8"
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 00:05:26 -0000

As far as I'm concerned, the server shouldn't be able to specify a
subprotocol if the client didn't request one.  If the client didn't request
a given subprotocol, it doesn't know how to speak it.  That's a failure
case, plain and simple.

The only "I don't care" exception that is acceptable is when the client
requests no subprotocol, and the server specifies no subprotocol in
response.

Cheers,
Brian


On Wed, Aug 31, 2011 at 4:58 PM, Joel Martin <hybi@martintribe.org> wrote:

> On Wed, Aug 31, 2011 at 4:59 PM, Brian <theturtle32@gmail.com> wrote:
>
>> Yes.  This requirement should be in the spec.  Frankly, I implemented my
>> WebSocket libraries this way as it's the only thing that makes any sense.  I
>> just assumed that's how it was supposed to be.  It didn't really occur to me
>> that the protocol was underspecified here.
>
>
> +1. This was also my assumption in implementing websockify. One of the
> protocols is mandatory if specified and the server may only respond
> successfully if it supports one of them.
>
> Also, should the server really be able to specify a protocol if the client
> didn't specify any? It seems that if the client doesn't specify a protocol
> then that ought to mean "no protocol" rather than "any protocol".
>
> Regards,
>
> Joel Martin (kanaka)
>