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

Iñaki Baz Castillo <ibc@aliax.net> Tue, 30 August 2011 11:17 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 DCA0021F8C08 for <hybi@ietfa.amsl.com>; Tue, 30 Aug 2011 04:17:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.646
X-Spam-Level:
X-Spam-Status: No, score=-2.646 tagged_above=-999 required=5 tests=[AWL=0.031, 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 BwweLlyhx8tu for <hybi@ietfa.amsl.com>; Tue, 30 Aug 2011 04:17:20 -0700 (PDT)
Received: from mail-qw0-f44.google.com (mail-qw0-f44.google.com [209.85.216.44]) by ietfa.amsl.com (Postfix) with ESMTP id EAF1E21F8B77 for <hybi@ietf.org>; Tue, 30 Aug 2011 04:17:19 -0700 (PDT)
Received: by qwc23 with SMTP id 23so4584498qwc.31 for <hybi@ietf.org>; Tue, 30 Aug 2011 04:18:45 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.229.68.1 with SMTP id t1mr6715385qci.198.1314703125130; Tue, 30 Aug 2011 04:18:45 -0700 (PDT)
Received: by 10.229.219.141 with HTTP; Tue, 30 Aug 2011 04:18:45 -0700 (PDT)
In-Reply-To: <4E5CC6A7.7030304@isode.com>
References: <CALiegfkC9dLOnLfSQApE9OjoSV1RXT7cTumZ6+yCR1tWo_cvmw@mail.gmail.com> <4E5CBEA0.2080605@isode.com> <CALiegfn3dPyZMR3ZZ3CtwOeAmC4sxd0=kos4Z82B2qeh_aZASQ@mail.gmail.com> <4E5CC6A7.7030304@isode.com>
Date: Tue, 30 Aug 2011 13:18:45 +0200
Message-ID: <CALiegfnc-YRPZZvgJjmvtafKnkJB7rXJ9KcPDKL-ceeAdwGEGQ@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] 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: Tue, 30 Aug 2011 11:17:21 -0000

2011/8/30 Alexey Melnikov <alexey.melnikov@isode.com>:
>> Why should the WS server accept (so 101) a WS handshake when the
>> client offers WS protocols NOT supported by the WS server? I don't
>> mean that the client does not provide Sec-WebSocket-Protocol header, I
>> mean that the client *provides * it, but offered protocols are NOT
>> supported by the server.
>>
> Because by definition the list of extensions in the Sec-WebSocket-Protocol
> header field is optional for the server to support. If we want to have "you
> must support this extension, or we fail the handshake", then we need another
> mechanism to tell the server.

Ok, so after client offers "Sec-WebSocket-Protocol: aaa, bbb" and the
server provides NO such header in the 101 response.... what are client
and server supposed to speak now?

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