Re: ABNF or code fragments?

On Wed, 24 Feb 2010 18:16:38 +0800, Jack Jansen <Jack.Jansen@cwi.nl> wrote:

>
> On 24 feb 2010, at 10:35, Philip Jägenstedt wrote:
>
>> We can decide for ourselves what is valid. I think it should be invalid  
>> to use percent encoding where it isn't needed, so that validators will  
>> warn against using #%74=1 and other stupid things. (But it would still  
>> work in conforming implementations.)
>
> Huh?
> Either it is valid (which seems to imply that percent-escape-processing  
> happens early) or it is not (if percent-processing happens late). If it  
> is valid then a validator has no business warning about it. This would  
> be a completely different case from, say, t=10,8, for which a validator  
> could conceivably warn that it is syntactically valid, but probably  
> semantically incorrect.

Only syntax that we actually want authors to use should be valid, but the  
processing rules need to tolerate some invalid syntax. For example,  
#t=1&fruit=bananas ought to be invalid, but implementations must ignore it  
(names/values it doesn't recognize) because otherwise it's impossible to  
extend MF in the future without breaking all existing implementations.

About percent encoding, I think the current processing is what it should  
be, which is close to what web servers currently do with query strings. We  
can make any strange percent-encoding valid to match processing, but I  
don't see why we would want to, as it is likely an authoring error and  
they would appreciate being told as much by validators.

-- 
Philip Jägenstedt
Core Developer
Opera Software

Received on Wednesday, 24 February 2010 10:45:58 UTC