Closed
Bug 113508
Opened 23 years ago
Closed 23 years ago
Identical URIs do not compare via nsIURI::Equals
Categories
(Core :: Networking, defect, P1)
Tracking
()
RESOLVED
FIXED
mozilla0.9.7
People
(Reporter: adamlock, Assigned: darin.moz)
Details
(Whiteboard: [ready-to-land])
Attachments
(2 files, 1 obsolete file)
1.15 KB,
text/plain
|
Details | |
652 bytes,
patch
|
andreas.otte
:
review+
rpotts
:
superreview+
|
Details | Diff | Splinter Review |
If I create a new URI object (e.g. via NS_NewURI) from "http://cnn" and another from "http://cnn/", they both become a URI with a "http://cnn/" spec but calling uri1->Equal(uri2, &isEqual) returns PR_FALSE. It looks like that trailing slash on the input screws up how mBasename is calculated, so when they are compared, the URLSegments differ. In particular mBasename.mLen is -1 in the first and 0 in the second. Aside from being wrong it may impact the performance of the cache and other areas.
Search for "http://cnn" to see the difference that the trailing slash makes on how the URI is stored and comparisons are made.
Assignee | ||
Comment 2•23 years ago
|
||
the cache actually just uses URL strings not URL objects to differentiate cache entries, so this bug shouldn't impact caching. however, this bug is still very critical IMO. -> 0.9.7
Severity: normal → critical
Priority: -- → P1
Target Milestone: --- → mozilla0.9.7
Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Attachment #60388 -
Attachment is obsolete: true
Assignee | ||
Comment 4•23 years ago
|
||
this patch fixed the problem. ran url parsing tests w/ this patch applied and didn't notice any regressions.
Assignee | ||
Comment 5•23 years ago
|
||
andreas: can i get an r= from you on the v1.0 patch? thx!
Assignee | ||
Updated•23 years ago
|
Whiteboard: [patch needs r/sr=]
Comment 6•23 years ago
|
||
Comment on attachment 60398 [details] [diff] [review] v1.0 patch sr=rpotts@netscape.com
Attachment #60398 -
Flags: superreview+
Comment 7•23 years ago
|
||
Comment on attachment 60398 [details] [diff] [review] v1.0 patch r=andreas.otte@debitel.net
Attachment #60398 -
Flags: review+
Assignee | ||
Updated•23 years ago
|
Whiteboard: [patch needs r/sr=] → [ready-to-land]
Assignee | ||
Comment 8•23 years ago
|
||
fixed-on-trunk
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•