Re: Progress on URL spec

On Sep 4, 2010, at 1:36 PM, Adam Barth wrote:

> 
>> This could be meant as a test for
>> relative references, but then the next step is:
>> 
>>  Consume characters up to, but not including, the first ":"
>>  character. These characters are the /scheme/.

To the extent that I can relate this spec to browser behaviors, I think this step is wrong. Browsers look for a ":" that occurs before any character that can't appear in a scheme under any circumstances, and that includes "#" and "/" for example. If a ":" isn't found before hitting a non-scheme character, the URL is invalid.

>> 
>> This would leave, say, "#:" as absolute reference with a scheme of
>> "#", as it contains a colon and "#" is the part before the first ":"
>> (similarily, ":" would be one with the empty string as scheme).
> 
> We have not yet defined how to resolve relative URLs.  The parsing
> definition, at least so far, is a definition of how to parse absolute
> URLs.  If you were asked to regard the string "#:" as an absoute URL,
> it seems like treating "#" as the scheme would be one reasonable
> interpretation.  I haven't thought through canonicalization yet, but I
> suspect testing will reveal that "#" is not a valid character for a
> scheme.

It's hard to tell if this makes sense without understanding what browser behavior would reflect this.

Regards,
Maciej

Received on Sunday, 5 September 2010 01:24:38 UTC