Closed Bug 94849 Opened 24 years ago Closed 24 years ago

URL - Wrong handling of empty relative urls

Categories

(Core :: Networking, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: andreas.otte, Assigned: neeti)

Details

Attachments

(1 file)

Our current handling of empty relative urls is not standards compliant: RFC 1808 defines: Within an object with a well-defined base URL of Base: <URL:http://a/b/c/d;p?q#f> the relative URLs would be resolved as follows: [...] An empty reference resolves to the complete base URL: <> = <URL:http://a/b/c/d;p?q#f> RFC 2396 defines: Within an object with a well-defined base URI of http://a/b/c/d;p?q the relative URI would be resolved as follows: [...] An empty reference refers to the start of the current document. <> = (current document) 1808 is obsolteted by 2396. Currently we resolve to http://a/b/c/. This is consistent with IE and NS 4.x, but inconsistent with any standard known to me.
r=bbaetz
sr=dougt
I think this issues was already debated before, and it was decided that we would live with this behavior. I think some one bug talked about the usage of "", but I can't seem to find it now...
There was some discussion in bug 78206, but no real decision I can think of was achived, just an exchange of opinions, also there was some discussion in the netlib newsgroup. On one side we want to conform to standards on the other you say we should stay with this definitly wrong implementation. In my opinion this is a remote border case plus there is an easy fix for websites using and/or relaying on it: simply use "./" if you want the old behaviour. I want to push it, implement the standard and see what happens. If we don't try we will never succeed on having a standards compliant browser and a web that conforms to that standards. Unless someone has really good reasons (beyond percentage of browsers doing the wrong thing) against it I will check this fix in as soon as possible.
Fix checked in
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
I confess again my limited understanding of this area... So, the the two RFC quotes seem to suggest the same correct behavior, (unlike other related URL bugs mentioned), and so I assume the "fix" implements this correctly. Is this the same as people complaining about how we resolve "" in HTML? Also, can we change the summary so it describes the coorect behavior (perhaps "Empty relative URLS (like <>) should resolve to the current URL") ? This would make the bug more searchable. (BTW, I really appreciate everyone's patience and diligence on these types of bugs. I'm a bit of a standards hawk, but RFC's like this do not make me happy either).
Yes, exactly: empty relative url = "" in HREF, and we do now implement the behaviour as of RFC 2396, loading the begining of the current document, same as "#".
Summary: Wrong handling of empty relative urls → URL - Wrong handling of empty relative urls
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: