Re: JSON headers

Willy Tarreau <w@1wt.eu> Mon, 11 July 2016 19:30 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@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 AD1A212D0AE for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 11 Jul 2016 12:30:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.208
X-Spam-Level:
X-Spam-Status: No, score=-8.208 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.287, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MR5XrI4ItND5 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 11 Jul 2016 12:30:19 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B062812D0CC for <httpbisa-archive-bis2Juki@lists.ietf.org>; Mon, 11 Jul 2016 12:30:19 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1bMgpy-0008Qx-WE for ietf-http-wg-dist@listhub.w3.org; Mon, 11 Jul 2016 19:25:51 +0000
Resent-Date: Mon, 11 Jul 2016 19:25:50 +0000
Resent-Message-Id: <E1bMgpy-0008Qx-WE@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <w@1wt.eu>) id 1bMgpv-0008QG-9H for ietf-http-wg@listhub.w3.org; Mon, 11 Jul 2016 19:25:47 +0000
Received: from wtarreau.pck.nerim.net ([62.212.114.60] helo=1wt.eu) by lisa.w3.org with esmtp (Exim 4.80) (envelope-from <w@1wt.eu>) id 1bMgpt-0007Sk-2L for ietf-http-wg@w3.org; Mon, 11 Jul 2016 19:25:46 +0000
Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id u6BJPFfW009620; Mon, 11 Jul 2016 21:25:15 +0200
Date: Mon, 11 Jul 2016 21:25:15 +0200
From: Willy Tarreau <w@1wt.eu>
To: Julian Reschke <julian.reschke@gmx.de>
Cc: Poul-Henning Kamp <phk@phk.freebsd.dk>, Yanick Rochon <yanick.rochon@gmail.com>, Phil Hunt <phil.hunt@oracle.com>, HTTP Working Group <ietf-http-wg@w3.org>
Message-ID: <20160711192515.GA9614@1wt.eu>
References: <8739.1468234635@critter.freebsd.dk> <38b3e7bb-3202-f489-ff15-d4d545e13ca0@gmx.de> <8854.1468236033@critter.freebsd.dk> <326f0b93-dbd5-3dfb-2a35-d1bf084684b4@gmx.de> <9221.1468245597@critter.freebsd.dk> <aa9cee9c-d8e3-17ba-9fcd-e327575cd5a8@gmx.de> <9801.1468259070@critter.freebsd.dk> <15d27f23-6b51-1e8e-3f10-194c80570424@gmx.de> <20160711190107.GB9542@1wt.eu> <0e467573-4f68-80a5-14a4-5a63b41ac4d4@gmx.de>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <0e467573-4f68-80a5-14a4-5a63b41ac4d4@gmx.de>
User-Agent: Mutt/1.6.0 (2016-04-01)
Received-SPF: pass client-ip=62.212.114.60; envelope-from=w@1wt.eu; helo=1wt.eu
X-W3C-Hub-Spam-Status: No, score=-5.5
X-W3C-Hub-Spam-Report: AWL=-0.575, BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_IRA=-1, W3C_WL=-1
X-W3C-Scan-Sig: lisa.w3.org 1bMgpt-0007Sk-2L 970dd9a8bc36baa07cdfe29c72962080
X-Original-To: ietf-http-wg@w3.org
Subject: Re: JSON headers
Archived-At: <http://www.w3.org/mid/20160711192515.GA9614@1wt.eu>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/31909
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 Mon, Jul 11, 2016 at 09:11:09PM +0200, Julian Reschke wrote:
> On 2016-07-11 21:01, Willy Tarreau wrote:
> > On Mon, Jul 11, 2016 at 08:05:32PM +0200, Julian Reschke wrote:
> > > On 2016-07-11 19:44, Poul-Henning Kamp wrote:
> > > > --------
> > > > In message <aa9cee9c-d8e3-17ba-9fcd-e327575cd5a8@gmx.de>, Julian Reschke writes
> > > > :
> > > > 
> > > > > b) relying on the uniqueness is a problem anyway (due to how JSON works).
> > > > 
> > > > Sorry, but I have no idea what you are saying there...
> > > 
> > > You can't rely on how a JSON parser reports or that it rejects duplicate
> > > fields.
> > 
> > Guys, I still don't understand why it would not work if everything is
> > considered to be a list. A list can be ordered, right ?
> 
> Inside a JSON *object*, the wire format allows multiple instances of the
> same key (member name), and the recipient behavior for these cases is
> undefined.

OK thanks for explaining. But then what situation could lead to this
confusing object to be emitted ? I thought that it was only related to
posting multiple headers in which case I don't see the issue if we
consider that all these headers are lists, and are then concatenated
by the recipient.

Thanks,
Willy