Re: making up new header field syntax...

Julian Reschke <julian.reschke@gmx.de> Thu, 29 June 2017 11:21 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 B66C412942F for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 29 Jun 2017 04:21:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.401
X-Spam-Level:
X-Spam-Status: No, score=-6.401 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_SORBS_SPAM=0.5, RP_MATCHES_RCVD=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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 747JrFUSddwW for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 29 Jun 2017 04:21:49 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id F2191127B73 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 29 Jun 2017 04:21:48 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.84_2) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1dQXTz-0005SK-BU for ietf-http-wg-dist@listhub.w3.org; Thu, 29 Jun 2017 11:19:35 +0000
Resent-Date: Thu, 29 Jun 2017 11:19:35 +0000
Resent-Message-Id: <E1dQXTz-0005SK-BU@frink.w3.org>
Received: from titan.w3.org ([128.30.52.76]) by frink.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <julian.reschke@gmx.de>) id 1dQXTr-0005Pq-UT for ietf-http-wg@listhub.w3.org; Thu, 29 Jun 2017 11:19:27 +0000
Received: from mout.gmx.net ([212.227.15.18]) by titan.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <julian.reschke@gmx.de>) id 1dQXTl-0005BX-Ly for ietf-http-wg@w3.org; Thu, 29 Jun 2017 11:19:22 +0000
Received: from [192.168.1.57] ([217.91.35.233]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LoEwL-1dxhYY3f8T-00gDzf; Thu, 29 Jun 2017 13:18:51 +0200
To: Mike West <mkwst@google.com>
Cc: HTTP Working Group <ietf-http-wg@w3.org>
References: <70d4cff9-77f6-277d-ecbb-441efbe24d70@gmx.de> <32e0bb44-54c2-d6a7-c14a-452738246e4d@gmx.de> <CAKXHy=dKq-pp5BRG1BqRyv=A3zFbs8P_zUV_4YK8+_cgNfxP5A@mail.gmail.com>
From: Julian Reschke <julian.reschke@gmx.de>
Message-ID: <c39fab3e-5263-69b2-975a-e9707a64b4af@gmx.de>
Date: Thu, 29 Jun 2017 13:18:50 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1
MIME-Version: 1.0
In-Reply-To: <CAKXHy=dKq-pp5BRG1BqRyv=A3zFbs8P_zUV_4YK8+_cgNfxP5A@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:eJDkApCV+G3+1GaWkg97mSqwTHSbr8nDwcT0wGUk3n5OkJtxPs8 uejlbNCtP3Ozc07uAPnBv1QuDAfi8gao2ENGKXcEqbnfjWInNo4xSi3AFqXds0K/8vH//Ja /skTY0EZq8LLg7QyalC/TpTPVS0k9fgsSfYRd8AOWf9/AFR2riBOQQBbsvu3t/VyL9IhS0V uLQgODKD3XZ2sg0w/BiFA==
X-UI-Out-Filterresults: notjunk:1;V01:K0:niT2IV2A2i8=:su8E22oaPhUm0nYVg1qJ1N H1X6rHRdz6+Lu3a0n/gn+rAvqaPqOOR2nSzrJG3QJJgZ5MtKTKu+5Qptm+SV4m1CqwLGKzdW5 B/WhjefdhXzUDQhF0rR9Fe6gMKHtYPkUQFcRP9a0cbFl90wY+PgXHa3prCSzQyi1LjDLCSOSJ RJGWJWfVTyMvkTIegVZt18AhbFSbIBfzACyF9VPV7uG+SK9/rcqoaixq1KwrMoLj5ERduj0r2 w2upvi4BNmpwA0VwramUBAvDej0kc7h1TGRXwvlVCyaP+6vcC02TPGaOIAks5PqAwsKINzjPH SCH9djHuE37HwI+1R88WDKJgBWpoJirgcCJbuNdm4HeSKt3lyYdAl3MWZXb8otbUaerNpK/6W 9LDUwDV0CvynAFwATgeLw1l5u6Xw+f2+9SwkoFkUwQ0CnS3W9DnkR2rCPhCcm9HhnHo+IGZsc 4H0+RsbF+KcrI4wt88I0WNoyK2lh7Wc0fYqAsQ66VEzfvBxPO8mlV3uWo/rOGamnmLuOW8maB 9kGo5sXLjgu9jLFEsTx3MKMIRyRGv+PbPYzftf/9FpEDudW/mEgBLFcl56+eTD7PGp5tHlQ+5 HDdIDFGInB//zXIIrou2OoxDRRaA3hd+OXr8jrMQ4wtbcnUEOOTJhv9aze9TMnyybYRzHQgTE +aGzSb2Oi7yfhz7adu59j/ubWFE7OpCnG/ZpYN5z8287D3bDy5OOjTlqpueaI/A/WiOgs3nXC t89vTealCnaDBvbAF0BJhDwwpVStMQRWsvwWKgMntquslwGiVODYDU2ZDZvQqmSo89+x5RFOD nL8lA0F
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=-6.3
X-W3C-Hub-Spam-Report: AWL=-0.391, BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, W3C_AA=-1, W3C_DB=-1, W3C_IRA=-1, W3C_WL=-1
X-W3C-Scan-Sig: titan.w3.org 1dQXTl-0005BX-Ly f944a5a05972bf22c2965b83d19ecfb3
X-Original-To: ietf-http-wg@w3.org
Subject: Re: making up new header field syntax...
Archived-At: <http://www.w3.org/mid/c39fab3e-5263-69b2-975a-e9707a64b4af@gmx.de>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/34035
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 2017-06-29 12:56, Mike West wrote:
> On Sun, Jun 25, 2017 at 1:57 PM, Julian Reschke <julian.reschke@gmx.de 
> <mailto:julian.reschke@gmx.de>> wrote:
> 
>     On 2017-06-25 13:52, Julian Reschke wrote:
> 
>         Here's a recent example I found (when looking for uses of JFV):
> 
> 
> Hey Julian! Thanks for pointing out these mistakes! I'd encourage you to 
> file bugs against the spec next time; I'm more likely to see them on 
> GitHub than here.
> ...

It was intended to get us back to work on this :-)

> I originally planned for this header to use JFV, and have backed away 
> from it because of the ongoing discussions in this group about what the 
> Syntax of the Future(tm) should look like. That said, I do anticipate 
> needing some more structure in the values in the fairly near future 
> (`"cookies"` is not nearly granular enough for most use cases, as it 
> turns out). Personally, I still believe JSON is a reasonable fit for 
> that kind of structure... :)

So do I, if only for the reason that we're not making progress on the 
other solution, and *not* using JFV seems to do actual harm right now...

> On that note, https://wicg.github.io/feature-policy/ is another example 
> you might be interested in skimming through.

Saw that. See 
<https://www.greenbytes.de/tech/webdav/draft-reschke-http-jfv-06.html#rfc.section.B>.

>         <https://w3c.github.io/webappsec-clear-site-data/#header
>         <https://w3c.github.io/webappsec-clear-site-data/#header>>:
> 
>             The Clear-Site-Data HTTP response header field sends a
>             signal to the user agent that it ought to remove all data of
>             a certain set of types. The header is represented by the
>             following ABNF [RFC5234]:
> 
>             Clear-Site-Data = 1#( DQUOTE ( data-type | extension-type )
>             DQUOTE )
>             data-type = "cache" | "cookies" | "storage" |
>             "executionContexts"
>             extension-type = 1*( ALPHA | "-")
>             ; #rule is defined in Section 7 of RFC 7230.
>             ; DQUOTE and ALPHA are defined in Appendix B.1 of RFC 5234.
> 
> 
>         Issues:
> 
>         a) the list rule is defined in RFC 7230, not RFC 5234
> 
> 
> Do you mean the reference to the `#rule`? That link points to RFC 7230, 
> as does the text, and https://tools.ietf.org/html/rfc7230#section-1.2 
> includes DQUOTE and ALPHA by reference to RFC 5234. Should we be 
> pointing to RFC 7230 for those as well?

I missed the reference in the comments part. Sorry. But no, this is 
*not* RFC5234-ABNF, so the introduction should be clearer on this. See, 
for instance, 
<https://www.greenbytes.de/tech/webdav/rfc7838.html#rfc.section.1.1>.

>         b) the syntax doesn't allow whitespace, but the examples use it
> 
> 
> I think `1#whatever` allows whitespace. That's my reading of 
> https://tools.ietf.org/html/rfc7230#section-7, but I'm (obviously!) not 
> an expert.

You are right, sorry. Must have imagined some sub structure in the 
fields that isn't there right now.

>         c) things look like quoted-strings, but aren't quoted-strings
> 
> 
> Would you be happier with something like `1#( quoted-string )`? I'd like 

That would be better.

> to specify the legal values so I can link to them later in the spec, but 
> I suppose that doesn't need to be done in the ABNF.

Exactly.

>         d) tokens not allowed
> 
> 
> Can you clarify what you'd like to see?

As long as this is just a list of keywords, you could just use a list of 
tokens (example: 
<https://www.greenbytes.de/tech/webdav/rfc7231.html#rfc.section.7.4.1>).

If you need or anticipate the need of keywords that aren't tokens (for 
instance, because of whitespace), I'd use

   token / quoted-string


>     e) ABNF invalid ("|" instead of "/" -
>     <https://www.youtube.com/watch?v=LbK-g8tKnoc
>     <https://www.youtube.com/watch?v=LbK-g8tKnoc>>)
> 
> 
> My mistake. Perhaps we should wire Bikeshed up to an ABNF validator. 
> Added a note to https://github.com/tabatkins/bikeshed/issues/459 to that 
> effect.

Best regards, Julian