Re: p1: BWS

Mark Nottingham <mnot@mnot.net> Tue, 23 April 2013 07:33 UTC

Return-Path: <ietf-http-wg-request@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 5803C21F9617 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 23 Apr 2013 00:33:01 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.511
X-Spam-Level:
X-Spam-Status: No, score=-10.511 tagged_above=-999 required=5 tests=[AWL=0.088, BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hK913KHMNV33 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 23 Apr 2013 00:33:00 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 24D0821F9616 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 23 Apr 2013 00:33:00 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1UUXiL-0004XJ-RC for ietf-http-wg-dist@listhub.w3.org; Tue, 23 Apr 2013 07:32:33 +0000
Resent-Date: Tue, 23 Apr 2013 07:32:33 +0000
Resent-Message-Id: <E1UUXiL-0004XJ-RC@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <mnot@mnot.net>) id 1UUXiH-0004Vz-Ft for ietf-http-wg@listhub.w3.org; Tue, 23 Apr 2013 07:32:29 +0000
Received: from mxout-08.mxes.net ([216.86.168.183]) by maggie.w3.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from <mnot@mnot.net>) id 1UUXiG-0000ug-Be for ietf-http-wg@w3.org; Tue, 23 Apr 2013 07:32:29 +0000
Received: from [192.168.1.80] (unknown [118.209.190.66]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTPSA id 24C6C509B5; Tue, 23 Apr 2013 03:32:04 -0400 (EDT)
Content-Type: text/plain; charset=iso-8859-1
Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\))
From: Mark Nottingham <mnot@mnot.net>
In-Reply-To: <51712EE4.7000408@gmx.de>
Date: Tue, 23 Apr 2013 17:32:01 +1000
Cc: Roberto Peon <grmocg@gmail.com>, Willy Tarreau <w@1wt.eu>, Amos Jeffries <squid3@treenet.co.nz>, HTTP Working Group <ietf-http-wg@w3.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <EA013249-27A2-40EE-AA5E-A0126E71D47D@mnot.net>
References: <DB8598D0-7AD8-4A90-806B-E4C7B65118D7@mnot.net> <516F76CB.20406@treenet.co.nz> <20130418060211.GC13063@1wt.eu> <468FAE72-012D-43EB-A5A7-EAA137687F87@mnot.net> <CAP+FsNdrf-7h=8+68AirD8jJRvhBXf-1uxmXc_3R80418yW2uA@mail.gmail.com> <D258E088-782D-4E16-976C-235F94520964@mnot.net> <51710FC3.9060200@gmx.de> <B55F7972-91BF-456F-B4E1-070685394B44@mnot.net> <51712EE4.7000408@gmx.de>
To: Julian Reschke <julian.reschke@gmx.de>
X-Mailer: Apple Mail (2.1503)
Received-SPF: pass client-ip=216.86.168.183; envelope-from=mnot@mnot.net; helo=mxout-08.mxes.net
X-W3C-Hub-Spam-Status: No, score=-4.3
X-W3C-Hub-Spam-Report: AWL=-2.413, BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001
X-W3C-Scan-Sig: maggie.w3.org 1UUXiG-0000ug-Be f8fca81e5aa4f981bf857120284f4b9f
X-Original-To: ietf-http-wg@w3.org
Subject: Re: p1: BWS
Archived-At: <http://www.w3.org/mid/EA013249-27A2-40EE-AA5E-A0126E71D47D@mnot.net>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/17491
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>

OK, marking both of the below for incorporation in -23.

On 19/04/2013, at 9:47 PM, Julian Reschke <julian.reschke@gmx.de> wrote:

> On 2013-04-19 13:39, Mark Nottingham wrote:
>> 
>> On 19/04/2013, at 7:34 PM, Julian Reschke <julian.reschke@gmx.de> wrote:
>> 
>>> On 2013-04-19 00:27, Mark Nottingham wrote:
>>>> We can either:
>>>> 
>>>> - make it a MUST
>>>> - document what the exceptional circumstances are that cause the SHOULD (but I don't think it's that kind of SHOULD)
>>>> - downgrade it to an "ought to"
>>>> 
>>>> I do note that we say "generate" there (which I missed before, sorry); in our terminology, that means you DON'T need to fix it up when forwarding it; it's only when you're actually creating the element that this applies.
>>>> 
>>>> So, I'd suggest we make it a MUST, and change the language slightly to clarify:
>>>> 
>>>> "...but it MUST NOT be generated in messages..."
>>> 
>>> I have no problem with *that* change.
>>> 
>>> What concerns we much more is the "MUST accept such bad optional whitespace and remove it before interpreting the field value or forwarding the message downstream" -- that part is fine for parsing the message itself (everybody needs to be able to do that), but *not* ok for individual field values. We need a distinction here.
>> 
>> Ah, yes, that was the part that sparked my original concern.
>> 
>> The text in the latest draft is:
>> 
>> """
>> BWS is used where the grammar allows optional whitespace, for historical reasons, but senders SHOULD NOT generate it in messages; recipients MUST accept such bad optional whitespace and remove it before interpreting the field value or forwarding the message downstream.
>> """
>> 
>> I'd suggest:
>> 
>> """
>> BWS is used where the grammar allows optional whitespace, for historical reasons, but it MUST NOT be generated in messages; recipients MUST accept such bad optional whitespace and remove it before interpreting the field value.
>> """
>> 
>> 
>>>> Also, in p2, I'd note that we do NOT allow BWS inside of media type parameters:
>>>>   https://svn.tools.ietf.org/svn/wg/httpbis/draft-ietf-httpbis/latest/p2-semantics.html#media.type
>>>> 
>>>> AIUI (thanks, Julian), this is because many implementations don't accept whitespace there at all. It might be worth noting in the text that this parameter construct is different in that aspect.
>>> 
>>> I don't know whether it's because of implementations following the spec, or the spec following implementations.
>>> 
>>> Somewhat outdated tests are over here: <http://greenbytes.de/tech/tc/httpcontenttype/>
>>> 
>>> I'm more than happy to require recipients to handle BWS here for consistency with other header fields, as long as we tell generators to never ever use it.
>> 
>> That would make current implementations non-conformant, where we already have interop. While consistency is good, that may be going too far for it.
>> 
>> I was thinking of something along the lines of
>> 
>> """
>> Note that unlike some similar constructs in other headers, media type parameters do not allow whitespace (even "bad" whitespace) around the "=" character.
>> """
>> 
>> Would that work for you?
>> ...
> 
> 
> +1 on both.
> 
> Best regards, Julian
> 
> 

--
Mark Nottingham   http://www.mnot.net/