Closed
Bug 155052
Opened 22 years ago
Closed 22 years ago
[FIX]document.referrer is always empty at image urls
Categories
(Core :: DOM: Core & HTML, defect, P3)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla1.1beta
People
(Reporter: jruderman, Assigned: bzbarsky)
References
Details
Attachments
(1 file)
(deleted),
patch
|
sicking
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
Steps to reproduce:
1. Go to http://neat.jpl.nasa.gov/.
2. Click or middle-click a link to one of the jpgs.
3. Admire the tic-tac-toe pattern.
4. javascript:alert("Referrer: " + document.referrer);
Result: empty string
Expected: http://neat.jpl.nasa.gov/
Mozilla does know the referrer, since reloading works correctly on porn sites
that require referrers. It's just not exposing it to the DOM of the page
constructed around the image.
This bug breaks the "go to referrer" bookmarklet, which is used to return from
an image to a thumbnail gallery that was accidentally closed. The bookmarklet
works correctly in IE, Netscape 4, and Opera.
Assignee | ||
Comment 1•22 years ago
|
||
I'll take this; this is pretty simple to fix.
Assignee: jst → bzbarsky
Component: DOM Level 0 → DOM HTML
OS: Windows XP → All
Priority: -- → P3
Hardware: PC → All
Target Milestone: --- → mozilla1.1beta
Reporter | ||
Comment 4•22 years ago
|
||
This is not a dup of 96485 or 123293. Those bugs are about Mozilla sending
incorrect/no referrers to servers in two cases, while this bug is about letting
javascript see the referrer in a third case.
Assignee | ||
Comment 5•22 years ago
|
||
This is basically a copy/paste from nsHTMLDocument::StartLoad(). Jesse, care
to review?
Assignee | ||
Updated•22 years ago
|
Summary: document.referrer is always empty at image urls → [FIX]document.referrer is always empty at image urls
Comment 6•22 years ago
|
||
Comment on attachment 89821 [details] [diff] [review]
Patch to fix
sr=jst, but what about non-ASCII characters in the referrer? UTF-8? Or do we
just don't care for now?
Attachment #89821 -
Flags: superreview+
Assignee | ||
Comment 7•22 years ago
|
||
nsHttpChannel uses GetAsciiSpec to get the referrer string from the nsIURI
object. So what we're doing here is fine... (the string is just URL-encoded)
Comment on attachment 89821 [details] [diff] [review]
Patch to fix
r=sicking
Attachment #89821 -
Flags: review+
Assignee | ||
Comment 9•22 years ago
|
||
fixed on trunk.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Updated•22 years ago
|
QA Contact: desale → stummala
Component: DOM: HTML → DOM: Core & HTML
QA Contact: stummala → general
You need to log in
before you can comment on or make changes to this bug.
Description
•