Ticket #209 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

nsIURL.ref doesn't include #, so add it in for Link Fingerprints

Reported by: Mardak Assigned to: MaierMan
Priority: minor Milestone: 1.0
Component: Components Version: trunk
Keywords: Cc:
Operating System: All

Description

It seems like @mozilla.org/network/standard-url;1's implementation of nsIURL will not include the '#' when getting Ref. And according to the idl, it's correct.

"Returns the reference portion (the part after the "#") of the URL. If there isn't one, an empty string is returned."

Testing it out on the nsIURI OriginalURI of nsHttpChannel..

ref: !md5!9e107d9d372bb6826bd81d3542a419d6a path: /dog#!md5!9e107d9d372bb6826bd81d3542a419d6a

Also, no need to match for empty #!!abc123 because it'll fail in |new DTA_Hash| anyway.

Attachments

addHashSign.patch (1.0 kB) - added by Mardak on 2007-06-22 22:54:41.
add hash for ref and don't match #!!abc123

Change History

2007-06-22 22:54:41 changed by Mardak

  • attachment addHashSign.patch added.

add hash for ref and don't match #!!abc123

2007-06-22 23:49:08 changed by MaierMan

  • status changed from new to closed.
  • resolution set to fixed.
  • component changed from Infrastructure to Components.
  • milestone set to 1.0.

That empty !! was a leftover from the initial implementation that additionally for !hash!... After some discussion with gerv I came to the conclusion that gerv was right this time and determining the algo from the length is bad (as future hashes might use the same bitlength as those we already support).
Simply missed that point.

I removed the URL part. Pretty pointless indeed, as URL usually implements URI and the URL code wasn't used in dTa anyway.

Good catches, thanks for reporting :D

Fixed [439]