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

Zhong Yu <zhong.j.yu@gmail.com> Wed, 16 January 2013 01:30 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 01C7B21F86E3 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 15 Jan 2013 17:30:55 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.499
X-Spam-Level:
X-Spam-Status: No, score=-10.499 tagged_above=-999 required=5 tests=[AWL=0.100, 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 sFfPFCO1BuMo for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 15 Jan 2013 17:30:54 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 5E01E11E80E1 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 15 Jan 2013 17:30: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 1TvHpE-0003T3-9U for ietf-http-wg-dist@listhub.w3.org; Wed, 16 Jan 2013 01:29:56 +0000
Resent-Date: Wed, 16 Jan 2013 01:29:56 +0000
Resent-Message-Id: <E1TvHpE-0003T3-9U@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 1TvHpB-0003RG-CE for ietf-http-wg@listhub.w3.org; Wed, 16 Jan 2013 01:29:53 +0000
Received: from mail-ob0-f181.google.com ([209.85.214.181]) by maggie.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <zhong.j.yu@gmail.com>) id 1TvHpA-0007Pg-82 for ietf-http-wg@w3.org; Wed, 16 Jan 2013 01:29:53 +0000
Received: by mail-ob0-f181.google.com with SMTP id oi10so851186obb.12 for <ietf-http-wg@w3.org>; Tue, 15 Jan 2013 17:29:25 -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=IVGrdqk9Qm4zSVocnfYDgQOruGopsRvwtbTVWQywZIE=; b=UcryiJhXTuGg8URoKBemxg7qIPFUbjIo7WzmWaZwRN7YGsJhJttaLOZkIeefTIAAx7 NEdK4cqncIkCH6NvpoRo5KReV0tKje/VxfFk9xOLCez4zNP4xcpu/Kso/yoPQ7f1xA7t o+o/3ivhWFvBMBYmd+FU5iQ+g+MgUB5nrl2GlO/RN74v1rXTDWtwypKGqc+7L4Kf4zQo Z/Leas+k4aYsOUWVi0sa9iohQF0jlGyoiPqli47oV/QkZvSzJVHiYMbBqSpghwIWOPeF OMG9ngou4XTKJShswvDEWbvPzxxak6q8kVxTzOrHwmBPehLpBpWX3aEw+mK+qhKn28JP bRow==
MIME-Version: 1.0
Received: by 10.60.32.33 with SMTP id f1mr57962937oei.122.1358299765731; Tue, 15 Jan 2013 17:29:25 -0800 (PST)
Received: by 10.76.12.227 with HTTP; Tue, 15 Jan 2013 17:29:25 -0800 (PST)
In-Reply-To: <CAK3OfOifs_EffAWkK8+FNxU-pOiDUpJP7x0GjxUYQ66YPgvWcw@mail.gmail.com>
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> <360A0ACE-4CA6-400A-BFE9-7DFF89AAB439@opera.com> <50F57628.5030502@gmx.de> <BD31B7FE-1CB4-48AD-A119-37A3509EF8E9@opera.com> <6D9EA8FA-50A6-44B1-A2EF-BB428E94183C@mnot.net> <CAK3OfOj8G3gFbTK_vPSnjS0qij+SUB3t9CdG80FYW5tbGgKR3A@mail.gmail.com> <C6A43E78-4F94-4FE3-A049-678555896FEC@mnot.net> <CAA6tFMvNifekQse9H6cbAXxsz1YXNPniW3QmxZo0GdLKZv3i_A@mail.gmail.com> <50F5FA1B.4000401@gmx.de> <CAK3OfOifs_EffAWkK8+FNxU-pOiDUpJP7x0GjxUYQ66YPgvWcw@mail.gmail.com>
Date: Tue, 15 Jan 2013 19:29:25 -0600
Message-ID: <CACuKZqFHMNK8yEiq1eJ-JyOk+gSL-Eh=CJyqUTjUSVJvmO55PQ@mail.gmail.com>
From: Zhong Yu <zhong.j.yu@gmail.com>
To: Nico Williams <nico@cryptonector.com>
Cc: Julian Reschke <julian.reschke@gmx.de>, 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.214.181; envelope-from=zhong.j.yu@gmail.com; helo=mail-ob0-f181.google.com
X-W3C-Hub-Spam-Status: No, score=-3.4
X-W3C-Hub-Spam-Report: AWL=-2.630, 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 1TvHpA-0007Pg-82 a6c7347309c57fa68704dc38a9154432
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/CACuKZqFHMNK8yEiq1eJ-JyOk+gSL-Eh=CJyqUTjUSVJvmO55PQ@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/15902
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 7:02 PM, Nico Williams <nico@cryptonector.com> wrote:
> On Tue, Jan 15, 2013 at 6:53 PM, Julian Reschke <julian.reschke@gmx.de> wrote:
>> On 2013-01-16 00:38, Piotr Dobrogost wrote:
>>> I guess what Nico had in mind is if this subject could be clarified in
>>> 2.0 so that we won't have problems we have now in the future.
>>
>>
>> What problem, exactly?
>>
>> Given a valid message, you can combine header fields as specified in the
>> spec. But you don't have to.
>
> You shouldn't if you're a middlebox.
>

On the server side, it is a good idea to merge headers. There's no
point for a server framework to return multiple values for one header
name - application will have to merge them anyway before parsing.
(Java Servlet for example does not merge headers; it's a source of
bug; fortunately clients usually don't split headers)

On the client side, it's probably the same story (except Set-Cookie)

Zhong Yu