[Webkit-unassigned] [Bug 45083] New: base URL + relative path result in URL that starts with "/."
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Sep 1 19:28:51 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=45083
Summary: base URL + relative path result in URL that starts
with "/."
Product: WebKit
Version: 420+
Platform: Android
URL: http://alien-me.com/testpage.html
OS/Version: Android
Status: UNCONFIRMED
Severity: Minor
Priority: P4
Component: HTML DOM
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: melanielclements at gmail.com
This is a bug that was originally filed under Android but has been narrowed down to the URL parsing portion of WebKit. When loading a page such as the one linked above, in which there is a <base> url and a relative path being processed, the browser will sometimes fail to remove all '.'s in the path, resulting in a URL which starts with '/.'. This does not comply with RFC 3986 section 5.4, as shown here http://curlies.googlecode.com/svn/trunk/test_results/latest/relative_results.html. This does not result in any errors and the url is followed properly by most browsers, but it is not the standard result.
Proposed Fix:
We have already fixed this within the Android codebase but would like to keep our code as consistent as possible, and would therefore like to update this change within the Webkit base as well. The following lines need to be added to WebCore/platform/KURL.cpp
1290
1291 // Remove any trailing '.' from base, in order to conform to RFC 3986 section 5.4
1292 if (p[-1] == '.') {
1293 p--;
1294 }
1295
This will remove a trailing '.' at the end of the base url, which is not checked and therefore results in the incorrect rendering.
Is this indeed the correct way to fix this? If not, what would be the appropriate way to deal with this issue?
Thanks!
--
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