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

Julian Reschke <julian.reschke@gmx.de> Tue, 15 January 2013 14:32 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 4C49221F84F2 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 15 Jan 2013 06:32:55 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.562
X-Spam-Level:
X-Spam-Status: No, score=-8.562 tagged_above=-999 required=5 tests=[AWL=2.038, 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 gDm2E3DfZsmM for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 15 Jan 2013 06:32:54 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 9D4A621F84ED for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 15 Jan 2013 06:32:54 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1Tv7YO-0007QL-Sj for ietf-http-wg-dist@listhub.w3.org; Tue, 15 Jan 2013 14:31:52 +0000
Resent-Date: Tue, 15 Jan 2013 14:31:52 +0000
Resent-Message-Id: <E1Tv7YO-0007QL-Sj@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <julian.reschke@gmx.de>) id 1Tv7YL-0007Pb-88 for ietf-http-wg@listhub.w3.org; Tue, 15 Jan 2013 14:31:49 +0000
Received: from mout.gmx.net ([212.227.15.18]) by lisa.w3.org with esmtp (Exim 4.72) (envelope-from <julian.reschke@gmx.de>) id 1Tv7YJ-0005r7-UY for ietf-http-wg@w3.org; Tue, 15 Jan 2013 14:31:49 +0000
Received: from mailout-de.gmx.net ([10.1.76.4]) by mrigmx.server.lan (mrigmx002) with ESMTP (Nemesis) id 0LcV56-1TCgRQ0TLS-00jmqj for <ietf-http-wg@w3.org>; Tue, 15 Jan 2013 15:31:22 +0100
Received: (qmail invoked by alias); 15 Jan 2013 14:31:21 -0000
Received: from mail.greenbytes.de (EHLO [192.168.1.102]) [217.91.35.233] by mail.gmx.net (mp004) with SMTP; 15 Jan 2013 15:31:21 +0100
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX1/lIE01LLTlgE4bn/4W1QYaNaTtuRuMaBy4DGxiPJ ITzmV5sK3/1OQ3
Message-ID: <50F5683A.9030604@gmx.de>
Date: Tue, 15 Jan 2013 15:31:22 +0100
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2
MIME-Version: 1.0
To: Zhong Yu <zhong.j.yu@gmail.com>
CC: Piotr Dobrogost <p@ietf.dobrogost.net>, ietf-http-wg@w3.org
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> <CACuKZqFwrKGXgO5NBGRFgG8U1=ed0RAde72KWwBundu9oLvaew@mail.gmail.com>
In-Reply-To: <CACuKZqFwrKGXgO5NBGRFgG8U1=ed0RAde72KWwBundu9oLvaew@mail.gmail.com>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
Received-SPF: pass client-ip=212.227.15.18; envelope-from=julian.reschke@gmx.de; helo=mout.gmx.net
X-W3C-Hub-Spam-Status: No, score=-3.4
X-W3C-Hub-Spam-Report: AWL=-3.376, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001
X-W3C-Scan-Sig: lisa.w3.org 1Tv7YJ-0005r7-UY 70b8a999e2a6db347bfca0149237a392
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/50F5683A.9030604@gmx.de>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/15878
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 2013-01-15 15:28, Zhong Yu wrote:
> 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)

It's the only exception I'm aware of (and, btw, this hasn't changed 
since rfc 2068 or even earlier).

Best regards, Julian