W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2009

[whatwg] URL decomposition on HTMLAnchorElement interface

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Fri, 27 Mar 2009 19:36:39 -0400
Message-ID: <49CD6307.7060709@mit.edu>
Anne van Kesteren wrote:
> On Fri, 27 Mar 2009 22:40:08 +0100, Boris Zbarsky <bzbarsky at mit.edu> wrote:
>> This is an option, but it's not obviously correct, just as it's not 
>> obviously correct (and in fact would break pages) to parse 
>> "http:foo.com/" without an authority.
> 
> Which pages would break? That URL does not work in Opera.

Hmm.  Interesting.  I seemed to recall a number of bugs on this issue, 
and it looks like we did use to have them.  The issue was that sites 
actually expected http:/foo and http:foo to be treated as _relative_ 
URIs equivalent to "/foo" and "foo", because that's what some of the 
early URI RFCs defined them to be.

Relevant bug comments are 
https://bugzilla.mozilla.org/show_bug.cgi?id=196088#c11 and 
https://bugzilla.mozilla.org/show_bug.cgi?id=142280#c1

I just tested, and the above two URIs are handled like http://foo in 
Webkit and Gecko, as relative URIs equivalent to replacing the filename 
by "http:/foo" and "http:foo" in Opera. I can't tell what IE is doing, 
since it loads absolutely nothing when such a URI is clicked over here 
(the document the link is in is at a file:// URI).

Fun times.  ;)

-Boris
Received on Friday, 27 March 2009 16:36:39 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:47:49 GMT