[Webkit-unassigned] [Bug 46982] Setting href protocol attribute on malformed URL is incorrect when page is served over HTTP

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 7 23:10:11 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=46982





--- Comment #6 from Brett Wilson (Google) <brettw at chromium.org>  2010-10-07 23:10:10 PST ---
To answer the question, if you have href="http://google.com" and you ask for the path component, should it be empty or should it be "/"? Another question would he "HTTP://google.com/" should the protocol be "http" or "HTTP". Currently Chromium will definitely give you a slash and "http" because it resolves the full URL all the time.

We have three different path canonicalization routines currently. One for hierarchical (http and the like), one for file URLs, and one for data/javascript URLs and the like.

Say the page says a.path = "/foo?bar#baz" I think we have to escape the ? and the # or else this won't just be setting the path. Yet if the algorithm is supposed to be "parse this URL and do a string substitution without canonicalization" then we would need yet a fourth mode where we just escape characters that change the parsing of the URL.

I think our behavior makes sense and I haven't heard of any real world problems with it. Changing this, even if it would make it more correct, would introduce a lot of complexity for almost no benefit.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list