Re: [hybi] Sec-WebSocket-Extensions field spec. contradiction

Iñaki Baz Castillo <ibc@aliax.net> Sat, 03 September 2011 18:32 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 B098521F8A6C for <hybi@ietfa.amsl.com>; Sat, 3 Sep 2011 11:32:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.645
X-Spam-Level:
X-Spam-Status: No, score=-2.645 tagged_above=-999 required=5 tests=[AWL=0.032, 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 dmah9URKJVSG for <hybi@ietfa.amsl.com>; Sat, 3 Sep 2011 11:32:53 -0700 (PDT)
Received: from mail-qw0-f52.google.com (mail-qw0-f52.google.com [209.85.216.52]) by ietfa.amsl.com (Postfix) with ESMTP id 21C0321F8A55 for <hybi@ietf.org>; Sat, 3 Sep 2011 11:32:52 -0700 (PDT)
Received: by qwb8 with SMTP id 8so3356498qwb.25 for <hybi@ietf.org>; Sat, 03 Sep 2011 11:34:31 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.229.28.200 with SMTP id n8mr1753338qcc.291.1315074871097; Sat, 03 Sep 2011 11:34:31 -0700 (PDT)
Received: by 10.229.79.207 with HTTP; Sat, 3 Sep 2011 11:34:31 -0700 (PDT)
In-Reply-To: <CALkdAkg79HMuP3Sbp=H25fFxu1f587kNO=QT4-R6eT2rJEsEJg@mail.gmail.com>
References: <CALkdAkg79HMuP3Sbp=H25fFxu1f587kNO=QT4-R6eT2rJEsEJg@mail.gmail.com>
Date: Sat, 03 Sep 2011 20:34:31 +0200
Message-ID: <CALiegf=UnDRccUSk9ifPZC32LQx=VMJGN0Hu7MJ=yTgmfiqVGw@mail.gmail.com>
From: Iñaki Baz Castillo <ibc@aliax.net>
To: Sylvain Hellegouarch <sh@defuze.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] Sec-WebSocket-Extensions field spec. contradiction
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: Sat, 03 Sep 2011 18:32:53 -0000

2011/9/3 Sylvain Hellegouarch <sh@defuze.org>:
> Section 4.2.2 says:
>
>> If multiple extensions are to be used, they must all be listed in a single
>> Sec-WebSocket-Extensions header field.  This header field MUST NOT be
>> repeated.
>
> But section 9.1 says:
>
>> Note that like other HTTP header fields, this header field MAY be split or
>> combined across multiple lines.  Ergo, the following are equivalent:
>>         Sec-WebSocket-Extensions: foo
>>         Sec-WebSocket-Extensions: bar; baz=2
>> is exactly equivalent to
>>         Sec-WebSocket-Extensions: foo, bar; baz=2
>
> Aren't those two statements contradicting themselves?

Good point. Also, why couldn't such a header occur multiple times in a
HTTP request/response? Usually, any HTTP header allowing multivalue
(separated by comma) also allows different values across multiple
headers, so:

  Foo: qwe, asd
  Foo:  zxc

is the same as:

  Foo: qwe, asd, zxc


This is true for most of the HTTP headers and parsers MUST be ready
for that. Please, don't add artificial constraints.

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