Re: [abnf-discuss] constrained-01 - advantage?

Julian Reschke <julian.reschke@gmx.de> Mon, 14 November 2016 05:12 UTC

Return-Path: <julian.reschke@gmx.de>
X-Original-To: abnf-discuss@ietfa.amsl.com
Delivered-To: abnf-discuss@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 69F101295FF for <abnf-discuss@ietfa.amsl.com>; Sun, 13 Nov 2016 21:12:26 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.601
X-Spam-Level:
X-Spam-Status: No, score=-2.601 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-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 00qtCStng3V5 for <abnf-discuss@ietfa.amsl.com>; Sun, 13 Nov 2016 21:12:25 -0800 (PST)
Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A1C64129622 for <abnf-discuss@ietf.org>; Sun, 13 Nov 2016 21:12:23 -0800 (PST)
Received: from [31.133.143.223] ([31.133.143.223]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MPlMc-1cB7Ne0JFa-004zOB; Mon, 14 Nov 2016 06:12:12 +0100
To: Sean Leonard <dev+ietf@seantek.com>
References: <5828DD42.8010009@gmail.com> <36FC0A35-2ADA-4710-ABFB-08E8B916718E@seantek.com> <a5d764a8-c560-bed3-095f-f1a1a5e35688@gmx.de> <F49254F8-41B7-499F-8745-5F2374693AA7@seantek.com>
From: Julian Reschke <julian.reschke@gmx.de>
Message-ID: <ea711a12-2edd-917b-2588-2e87fed3c379@gmx.de>
Date: Mon, 14 Nov 2016 06:12:09 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0
MIME-Version: 1.0
In-Reply-To: <F49254F8-41B7-499F-8745-5F2374693AA7@seantek.com>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: 8bit
X-Provags-ID: V03:K0:RNbyP14bXBcbE+jzk9e+XYdLD3NofUrd5oGxPwJIOyyCVpFrCA4 Rrz0yjGtYaNqNUNTA+HaDDAKsMdNOIGgGLnbVNh2KNAH9neAcF5XCVz/3evLxaqm7fKzyf2 +H4vh4co9ffWilwrARO3ybMHmcpiA2RwQOXVy3TPB0s0t3e2miGLtNR4aEZY1Z9OMWIoXs/ egvkMCqNfj9wBumDg9q4A==
X-UI-Out-Filterresults: notjunk:1;V01:K0:WaMdij3x0Sw=:DEosgyw2CGUwrmXsKkUxVO 3HCs1p6kYufocnevAwm+H2+zE+PvKYqrZ9JTp9lx6aVpORRkfESek+On6b8Z4XHfLlXVCHd6r 6uVzDdveueO5ffKOW3F7nTmG6xkniKjoXoPZ/ws8xpwOR4eh4ixikhofRpLx0KIWCB7wDTQu6 hYmXVhUCzfkdEx9snN9SQNDU3xGLAAGm2H+19GoBgbswa2XRoToTU48JXgynUpg8JVLuzAc12 sEfv80910zsZ3fk1GZNt/oaSbGDtudfQ+ER5Pwcgonb7MSB0ZcS/DqoaDAzP1u1zHMLUDdLZF 55gyg9LDq6CEb5NgUtPw+lch5WTHy8dk8BSMceHkweMqWQkDSD0OwVZySWKWSE46xwNj9VVNv H//D19ka5fOyNfU5FtqEWk+fQNbl7gT5B0iBovEW2tYoPiS9iCOPUGADtBQ6GXtcKkXov5bHP nbTLnPV8/QJXNLNdrKp1aH+YbDza2QfZXvrdhQ4QLqEJItEBvD67jJJeGMEqa7Aztv+pROEpj 81XTxTrjIlmKadNONtOVGeCRDw3g+ZlWi/+QEwlWJH5RDtJ3OFwfSAayIABHaTzWJrhpt2v/7 gAimjSSQCz7C9L399+CUHNCKQUfopPGei1WYaDwNcHLk7P4AzVx0rJsJX9ry/VdvDz6HrPod2 DR1kcMlSMdFOD20defEQvvkj02XrEaFZbhJ1NeEoH+en9mbf1HrrKW2V7UrCbP1ZUfxff9Wgi oDYPIWDEU0N2rw17R8ceochPp5gXVwMDK2F0Y3R5JOLoJNjVA999dRxry0XzZrn2wb2GUAfBf SSlX8je
Archived-At: <https://mailarchive.ietf.org/arch/msg/abnf-discuss/k-nHWHrKfvF75FAjpcER--e92jc>
Cc: Doug Royer <douglasroyer@gmail.com>, abnf-discuss@ietf.org
Subject: Re: [abnf-discuss] constrained-01 - advantage?
X-BeenThere: abnf-discuss@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: "General discussion about tools, activities and capabilities involving the ABNF meta-language" <abnf-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/abnf-discuss>, <mailto:abnf-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/abnf-discuss/>
List-Post: <mailto:abnf-discuss@ietf.org>
List-Help: <mailto:abnf-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/abnf-discuss>, <mailto:abnf-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 14 Nov 2016 05:12:26 -0000

On 2016-11-14 05:55, Sean Leonard wrote:
> ...
>> See how RFC 7230 distinguishes between parsing the HTTP message info fields and field values, and then has completely *separate* ABNFs for each field value.
>
> Yes, I saw that. It is a difference approach to the “mail standards” approach, which uses a lot of / and =/ and extension-header syntaxes.

And RFC 2616 did that as well - it's just that we (that is the HTTPbis 
WG) decided that this use of ABNF isn't helpful -- IMHO the structure of 
the ABNF should be aligned with how messages are parsed; so this change 
in RFC 723x reflects that reality.

> A disadvantage of the RFC 7230 approach is that the relationship between the generic header production and specific headers is not formalized. For example, 7230 says:
>
>    HTTP-message = start-line *( header-field CRLF ) CRLF [ message-body
>     ]
>
>    header-field = field-name ":" OWS field-value OWS
>
>    Via = *( "," OWS ) ( received-protocol RWS received-by [ RWS comment
>     ] ) *( OWS "," [ OWS ( received-protocol RWS received-by [ RWS
>     comment ] ) ] )

Can you clarify why that is a problem?

> All that is very interesting, but if you want to verify that the ABNF is correct (or if you want to verify that sample HTTP messages conform to the ABNF), you have to do extra steps to extract each header-field and match them to the particular field values.

There are two questions here.

- if you want the validity of the message itself, you check the message ABNF

- if you want to check the validity of a given field value, you check 
the field value against the field's ABNF


> It is desirable to express the relationship between the <Via> production, and the <field-name> “Via”. Specifically, when <field-name> is “Via”, then <field-value> is <Via>.

Yes, I wouldn't be opposed to a mechanism that just deals with that.

> A recent place where this leads to a protocol problem is the PKCS #11 URI scheme. RFC 7512 says that “|” can appear in <pk11-query-res-avail>, as a delimiter to some command-path. But “|” is not a part of URIs under [RFC3986]. Therefore, any [RFC3986] conforming URI parser is going to reject what RFC 7512 says are valid pkcs11: URIs. If the relationship between URI@[RFC3986] and pk11-URI@[RFC7512] could have been expressed formally (namely that pk11-URI is a subset of URI), then a validator could have easily flagged that problem during the editorial process.

I believe that's a much better example to use.

Best regards, Julian