Re: Multiple header fields with the same field name - unwritten assumption about quoted commas in values?

Zhong Yu <zhong.j.yu@gmail.com> Tue, 15 January 2013 14:31 UTC

Return-Path: <ietf-http-wg-request@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id F0D6121F86F8 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 15 Jan 2013 06:31:31 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.449
X-Spam-Level:
X-Spam-Status: No, score=-10.449 tagged_above=-999 required=5 tests=[AWL=0.150, BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gSe97ton8G4g for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 15 Jan 2013 06:31:30 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 6778321F8644 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 15 Jan 2013 06:31:30 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1Tv7Vw-0002wG-0p for ietf-http-wg-dist@listhub.w3.org; Tue, 15 Jan 2013 14:29:20 +0000
Resent-Date: Tue, 15 Jan 2013 14:29:20 +0000
Resent-Message-Id: <E1Tv7Vw-0002wG-0p@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <zhong.j.yu@gmail.com>) id 1Tv7Vs-0002vW-8b for ietf-http-wg@listhub.w3.org; Tue, 15 Jan 2013 14:29:16 +0000
Received: from mail-oa0-f53.google.com ([209.85.219.53]) by maggie.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <zhong.j.yu@gmail.com>) id 1Tv7Vr-0008Kt-Hp for ietf-http-wg@w3.org; Tue, 15 Jan 2013 14:29:16 +0000
Received: by mail-oa0-f53.google.com with SMTP id j6so156705oag.40 for <ietf-http-wg@w3.org>; Tue, 15 Jan 2013 06:28:49 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=v2p3MmCj1gA0+L7OkS0iF8Stqv+yT9MZi3BKjX7sYkA=; b=I/V3oABcuyocSLF7birSvi381KPIyXvvp2LPU7oH8EkAknQeczGSDS13abDZhWfLE6 fDswuUesYsdM66cING6QbAVR4T7dYdunQ/rimTshHFIX3v1dkhD6A3IEoZ0ebATBOcH8 08gxDxBkhBduwbH0MAqeDlfL7ZQY7mQX2OrTB7MOowJSnxF47YiDVcCjXVYGjbF21Cue eX6y0yprvePI7zrGDNap6g8szqTlBWdqvVmM9zWyXwjsgnInpnWulhtVsmLLRcdwkZ+N GSHrX1Gb4RwViENQ1HOxZtTz8+m2s0CXnYmAXhRkBdwTc0mXM2pd31HCTB1QWDxRBZwO YsZw==
MIME-Version: 1.0
Received: by 10.60.31.49 with SMTP id x17mr56178294oeh.33.1358260129349; Tue, 15 Jan 2013 06:28:49 -0800 (PST)
Received: by 10.76.12.227 with HTTP; Tue, 15 Jan 2013 06:28:49 -0800 (PST)
In-Reply-To: <50F549D8.2050501@gmx.de>
References: <CAA6tFMtOtpu-KJ1PMctU-XqZBXieOgb=uxPNj9wkRBvvbK7iXg@mail.gmail.com> <CACuKZqFWzApgkbQUEgOoNrumJFKSeVFZeCzZgvWDBGukykVqiA@mail.gmail.com> <50ED4DB4.5010803@gmx.de> <CACuKZqHDWbNMiwjkxvBuAt-UEg_tjzEvFZsyXM2U+5H5qxK76A@mail.gmail.com> <50ED9CEF.8080609@gmx.de> <CACuKZqFQ1=0sU7uhnh9_xew5=jPjS3WtEgrtu1RFH+Nu_=FwrQ@mail.gmail.com> <50EDA819.4040402@gmx.de> <CACuKZqH4+JUe4Gqp7LRGkCorFdQ107S=sf2uOSZnMkdgHmJaaQ@mail.gmail.com> <50EDD95C.9080206@gmx.de> <CAA6tFMsgAKL+-UW6rS0ScxpvukBhJ2ExT9KMWudiKa65YCpkew@mail.gmail.com> <50F549D8.2050501@gmx.de>
Date: Tue, 15 Jan 2013 08:28:49 -0600
Message-ID: <CACuKZqFwrKGXgO5NBGRFgG8U1=ed0RAde72KWwBundu9oLvaew@mail.gmail.com>
From: Zhong Yu <zhong.j.yu@gmail.com>
To: Julian Reschke <julian.reschke@gmx.de>
Cc: Piotr Dobrogost <p@ietf.dobrogost.net>, ietf-http-wg@w3.org
Content-Type: text/plain; charset="ISO-8859-1"
Received-SPF: pass client-ip=209.85.219.53; envelope-from=zhong.j.yu@gmail.com; helo=mail-oa0-f53.google.com
X-W3C-Hub-Spam-Status: No, score=-3.5
X-W3C-Hub-Spam-Report: AWL=-2.707, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001
X-W3C-Scan-Sig: maggie.w3.org 1Tv7Vr-0008Kt-Hp 6ef2105af836e7ffc23fa93be8de2bb6
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Multiple header fields with the same field name - unwritten assumption about quoted commas in values?
Archived-At: <http://www.w3.org/mid/CACuKZqFwrKGXgO5NBGRFgG8U1=ed0RAde72KWwBundu9oLvaew@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/15877
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

On Tue, Jan 15, 2013 at 6:21 AM, Julian Reschke <julian.reschke@gmx.de> wrote:
> On 2013-01-15 12:47, Piotr Dobrogost wrote:
>>
>> To summarize, from the point of view of http client library (see
>> https://github.com/kennethreitz/requests/issues/741):
>>
>> - The safe approach is to not merge any header fields with the same field
>> name.
>
>
> Yes.
>
>
>> - If merging, merge only those fields which are known to be safe to
>> merge ie. those, which can be parsed after merging. Also, if the top
>> most production in BNF specyfing field's value is #(values) it does
>> NOT mean the field is safe for merging although this seems to be
>> implied by the statement in the spec starting with "Multiple header
>> fields with the same field name MUST NOT be sent (...)"
>
>
> If a spec uses the list production but then doesn't allow proper parsing
> then that spec is buggy (such as Set-Cookie).

It's good to know whether Set-Cookie is the only exception among
well-known headers existed before rfc2616?

(Any headers introduced after rfc2616 should follow the rule; no slack for them)

Zhong Yu