Re: p1: BWS

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?

Cheers,


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

Received on Friday, 19 April 2013 11:40:31 UTC