Re: New Version Notification for draft-kamp-httpbis-structure-01.txt (fwd)

Julian Reschke <julian.reschke@gmx.de> Fri, 11 November 2016 12:50 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 2C1E3129B6E for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 11 Nov 2016 04:50:11 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.398
X-Spam-Level:
X-Spam-Status: No, score=-8.398 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-1.497, 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 R23Bs0OEAfQ2 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 11 Nov 2016 04:50:08 -0800 (PST)
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 18C19129B5B for <httpbisa-archive-bis2Juki@lists.ietf.org>; Fri, 11 Nov 2016 04:50:07 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1c5BDv-0004L9-RV for ietf-http-wg-dist@listhub.w3.org; Fri, 11 Nov 2016 12:46:27 +0000
Resent-Date: Fri, 11 Nov 2016 12:46:27 +0000
Resent-Message-Id: <E1c5BDv-0004L9-RV@frink.w3.org>
Received: from mimas.w3.org ([128.30.52.79]) by frink.w3.org with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <julian.reschke@gmx.de>) id 1c5BDn-0004KL-FL for ietf-http-wg@listhub.w3.org; Fri, 11 Nov 2016 12:46:19 +0000
Received: from mout.gmx.net ([212.227.17.20]) by mimas.w3.org with esmtps (TLS1.2:DHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <julian.reschke@gmx.de>) id 1c5BDh-0002JK-Cc for ietf-http-wg@w3.org; Fri, 11 Nov 2016 12:46:14 +0000
Received: from [192.168.1.123] ([5.10.171.186]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LlpJU-1ceEyu2yEy-00ZNUT; Fri, 11 Nov 2016 13:45:44 +0100
To: Poul-Henning Kamp <phk@critter.freebsd.dk>, HTTP Working Group <ietf-http-wg@w3.org>
References: <78354.1477853918@critter.freebsd.dk>
From: Julian Reschke <julian.reschke@gmx.de>
Message-ID: <f8b3b877-6b6e-f002-f237-311e91b86d82@gmx.de>
Date: Fri, 11 Nov 2016 13:45:44 +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: <78354.1477853918@critter.freebsd.dk>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:/I8fhVEd/fASzWVZMAmoJSAT3Rq6hT9lzYdfZOoUfcy0AXC7I1L gtKMhyPUTMbVevxqa1g1P0/NSghRIrX2znEr7+VrsFlMO5j41NwVm31j8CmiFYbtW3whXrh 5XH2geD+XdkFVzF6IeNSWu5ll6C8uFbh/FZANr6Ktr6AgZx3ILI8nsPhAPF1y2N4kNZRGgQ I6Kc12/4x0vgkua8Xd1lA==
X-UI-Out-Filterresults: notjunk:1;V01:K0:vzUsjnnCT80=:o1VF5HGTqy5cZHfO8283+M 0yRIC7ZnmN71bYhTEC8lk5Yt/tOBVxvZxcosJkNcAhUIEDGCxx7MbzzWqIC3ngnvqYIdIrDFx tC+c/0UOrWpVdfS5ejJjRwcxDvAAp3Zii8yivs6NoGya8BnGt/Dlai65CmeOJ7Zuu/Pk3evQw TYaHojGmUgk7gN4ucvWd5zINzBU5Wxho4Jmyfu9QCFwFzCtEaFjBSo/nMGFVwE8Y6LZwlBCT5 pFcTs/mxWZiOtzJP62R4eoyy/u6Eoa+Kn392Eh7s5OQ1S77dsxh+T/ql2OCBd7qUE3fKgd9nq FTtsVVuhSzGqU0O4knZPPQBjZQor29Z5gG6AsbrT045RpqRYaAcpOlrBCP+XfjhpA2HEcnEFV 4OiQsHVjWW/ZI3dI8v0j8G591NjR1pf3b5eqqVy42zsJo8L4cvjx7JcHIoJAvBxuyMebvrZ7J CDrP3iXvvEgwKc9RKOrdRP8qtmKO1c45LpFPpe12ieNAA+HbhnOSuqyOyWuN9xabOdQf78dP+ RgVcWaSmXcpR+glYXS3mLBanw5zxUXq3L9Gdhih9SOfYfZrz3ez+x3iqBhtf1K9bfuZx7aXMS azJHrQbr0M+yfu4y8nqFUP9et/IZdkgmE+sE9e7y8cHRwM5hil/2NR4Y5BuUKj15Lidj/0w6u qGwphRUO2pIlPKvap929L2wQmTodoLxxIuZGfUNaA5tdVEmS0HOaBe5nRjNv4VN5pGHP1gqAb x3+8p7IqiZubLwejUDsU5VE7uWf9ssAYfxbrq0yfRZS7S2yTplg5/gDflFblIh4xSUaGr/UXa JTuXyi4
Received-SPF: pass client-ip=212.227.17.20; envelope-from=julian.reschke@gmx.de; helo=mout.gmx.net
X-W3C-Hub-Spam-Status: No, score=-8.2
X-W3C-Hub-Spam-Report: AWL=1.301, BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-2.899, SPF_PASS=-0.001, W3C_AA=-1, W3C_DB=-1, W3C_IRA=-1, W3C_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1c5BDh-0002JK-Cc ab6bc97707f42e965a7ed4f34d886c0d
X-Original-To: ietf-http-wg@w3.org
Subject: Re: New Version Notification for draft-kamp-httpbis-structure-01.txt (fwd)
Archived-At: <http://www.w3.org/mid/f8b3b877-6b6e-f002-f237-311e91b86d82@gmx.de>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/32863
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-10-30 19:59, Poul-Henning Kamp wrote:
> Updated in preparation for WG discussion in Seoul.
>
> Minor changes only.
>
> Github repo: 	https://github.com/bsdphk/id_common_structure

Thanks!

Find below some (unstructured) feedback:

    For textual formats, such as JSON, the format must first be neutered
    to not violate field-value's ABNF, and then workarounds added to
    reintroduce the features just lost, for instance UNICODE strings, and
    suddenly it is no longer JSON anymore.

That's misleading.

a) yes, it needs to be "neutered", but that's a simple character 
replacement operation, so it can be run on an existing JSON text.

b) the features that are lost are essentially line breaks and raw 
non-ASCII characters; however, the transmitted string would *still* be JSON.

        ascii_string = * %x20-7e
                # This is a "safe" string in the sense that it
                # contains no control characters or multi-byte
                # sequences.  If that is not fancy enough, use
                # unicode_string.

        unicode_string = * unicode_codepoint
                # XXX: Is there a place to import this from ?
                # Unrestricted unicode, because there is no sane
                # way to restrict or otherwise make unicode "safe".

It's not clear why there's even a distinction...

Also, it needs to be stated whether the grammar is octet or character 
based. For an abstract datamodel, the latter probably makes more sense.

        h1_common-structure-header =
                ( field-name ":" OWS ">" h1_common_structure "<" )
                        # Self-identifying HTTP headers
                ( field-name ":" OWS h1_common_structure ) /
                        # legacy HTTP headers on white-list, see {{iana}}

Do not mix message block ABNF with field value ABNF. Just define what's 
inside the field value.

        h1_element = identifier * (";" identifier ["=" h1_value])

Shouldn't the second "identifier" be "token"?

        h1_ascii_string = DQUOTE *(
                        ( "\" DQUOTE ) /
                        ( "\" "\" ) /
                        0x20-21 /
                        0x23-5B /
                        0x5D-7E
                        ) DQUOTE
                # This is a proper subset of h1_unicode_string
                # NB only allowed backslash escapes are \" and \\

        h1_unicode_string = DQUOTE *(
                        ( "\" DQUOTE )
                        ( "\" "\" ) /
                        ( "\" "u" 4*HEXDIG ) /
                        0x20-21 /
                        0x23-5B /
                        0x5D-7E /
                        UTF8-2 /
                        UTF8-3 /
                        UTF8-4
                        ) DQUOTE
                # This is UTF8 with HTTP1 unfriendly codepoints
                # (00-1f, 7f) neutered with \uXXXX escapes.

How would a generic recipient decide whether it needs to handle "\u"? 
What's the point of having different ABNF productions?

Also: this puts raw non-ASCII UTF-8 in the string value. It's not clear 
that this is a good idea for HTTP/1, but if it is, it could be done in 
JSON as well, which would eliminate one of the counter arguments in the 
Introduction.

        h1_common_structure = ">" h1_common_structure "<"

That's a bit too recursive (speaking of which: "_" isn't allowed in ABNF 
names)



Best regards, Julian