Re: JSON headers

Julian Reschke <julian.reschke@greenbytes.de> Sun, 10 July 2016 07:55 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 C53FF12B017 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 10 Jul 2016 00:55:39 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.308
X-Spam-Level:
X-Spam-Status: No, score=-8.308 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, 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
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=greenbytes.de header.b=JM0q87o7; dkim=pass (1024-bit key) header.d=greenbytes.de header.b=JM0q87o7
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 VCD2QKHl07E7 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 10 Jul 2016 00:55:38 -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 23BEF12B00F for <httpbisa-archive-bis2Juki@lists.ietf.org>; Sun, 10 Jul 2016 00:55:37 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1bM9WS-0002Xv-2J for ietf-http-wg-dist@listhub.w3.org; Sun, 10 Jul 2016 07:51:28 +0000
Resent-Date: Sun, 10 Jul 2016 07:51:28 +0000
Resent-Message-Id: <E1bM9WS-0002Xv-2J@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <julian.reschke@greenbytes.de>) id 1bM9WQ-0002Wn-GP for ietf-http-wg@listhub.w3.org; Sun, 10 Jul 2016 07:51:26 +0000
Received: from mail.greenbytes.de ([5.10.171.186]) by maggie.w3.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from <julian.reschke@greenbytes.de>) id 1bM9WM-0006qu-Sy for ietf-http-wg@w3.org; Sun, 10 Jul 2016 07:51:24 +0000
Received: by mail.greenbytes.de (Postfix, from userid 117) id C475915A0628; Sun, 10 Jul 2016 09:50:54 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=greenbytes.de; s=mail; t=1468137054; bh=Iq4rkg2dmQFxTpAksoF9q5xFDbGePkMSpncJCVdE/gI=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From; b=JM0q87o7CsVs0iHrV5bauN4wjmcUdFX2J0GJejZ+g7eJDr+L8FF5p3EGto9wpV/Q4 /Kf89wSuqNd64EpxQfgg4xdkzLDSN3V5NUTnP55ZuqpzM85VEP9g6bP5HsFP7Jppma dhjcGyg/Y2V172wvH4fYJmrG6pLJoDYLqZSNxkKY=
Received: from [192.168.178.20] (unknown [93.217.120.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.greenbytes.de (Postfix) with ESMTPSA id A408D15A0413; Sun, 10 Jul 2016 09:50:53 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=greenbytes.de; s=mail; t=1468137054; bh=Iq4rkg2dmQFxTpAksoF9q5xFDbGePkMSpncJCVdE/gI=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From; b=JM0q87o7CsVs0iHrV5bauN4wjmcUdFX2J0GJejZ+g7eJDr+L8FF5p3EGto9wpV/Q4 /Kf89wSuqNd64EpxQfgg4xdkzLDSN3V5NUTnP55ZuqpzM85VEP9g6bP5HsFP7Jppma dhjcGyg/Y2V172wvH4fYJmrG6pLJoDYLqZSNxkKY=
To: Phil Hunt <phil.hunt@oracle.com>, Poul-Henning Kamp <phk@phk.freebsd.dk>
References: <74180.1468000149@critter.freebsd.dk> <A17D3EFD-A935-4971-BCF6-DC9D38302CAD@oracle.com>
Cc: HTTP Working Group <ietf-http-wg@w3.org>
From: Julian Reschke <julian.reschke@greenbytes.de>
Message-ID: <564a72e8-b9d3-1f9c-5982-48f2b07272e5@greenbytes.de>
Date: Sun, 10 Jul 2016 09:50:52 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0
MIME-Version: 1.0
In-Reply-To: <A17D3EFD-A935-4971-BCF6-DC9D38302CAD@oracle.com>
Content-Type: text/plain; charset="windows-1252"; format="flowed"
Content-Transfer-Encoding: 7bit
Received-SPF: pass client-ip=5.10.171.186; envelope-from=julian.reschke@greenbytes.de; helo=mail.greenbytes.de
X-W3C-Hub-Spam-Status: No, score=-6.0
X-W3C-Hub-Spam-Report: AWL=0.303, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RP_MATCHES_RCVD=-1.287, SPF_PASS=-0.001, W3C_AA=-1, W3C_IRA=-1, W3C_WL=-1
X-W3C-Scan-Sig: maggie.w3.org 1bM9WM-0006qu-Sy 8b05d2a0a74c0bdc204b8f42e8793a11
X-Original-To: ietf-http-wg@w3.org
Subject: Re: JSON headers
Archived-At: <http://www.w3.org/mid/564a72e8-b9d3-1f9c-5982-48f2b07272e5@greenbytes.de>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/31854
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 2016-07-08 20:44, Phil Hunt wrote:
> Not sure if this has been discussed. One of the biggest problems with
> HTTP request signing has been repeat headers. It presents problem of
> detecting which headers are intended and which header was signed first.
>
> It would be nice if the JSON encoding handled arrays so that the demand
> for duplicate headers is removed.  Signing could then be more successful
> and could even stipulate that the presence of a repeat header in a
> signed request is a failure condition.
> ...

FWIW, duplicate headers aren't really needed, when the header field was 
defined properly (so the only problem is Set-Cookie, see 
<https://greenbytes.de/tech/webdav/rfc7230.html#field.order>).

The current JFV spec uses JSON arrays as data mpdels, and thus maps well 
to the HTTP header field data model:

1. Ordering is significant

2. Values can appear in separate field values, or comma-delimited

3. Multiple values can be recombined using comma as delimiter

etc.

Best regards, Julian