Closed Bug 300942 Opened 19 years ago Closed 19 years ago

<base href> and background: url(); send the wrong referer for the image request

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.8beta4

People

(Reporter: janmoesen_=-bugzilla-=+spamtrap, Assigned: dbaron)

References

()

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b3) Gecko/20050712 Firefox/1.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b3) Gecko/20050712 Firefox/1.0+

When specifying a <base href="http://www.example.com/" />, images loaded via
CSS's "background: url()" syntax get the base href as the referer. Shouldn't
they have the real document as the referer?

Reproducible: Always

Steps to Reproduce:
1. Open URL with testcases
2. Observe how the first case (no base href) works fine
3. Observe how the second case sends http://www.disney.com/ as the referer
Actual Results:  
print-referer.jpg is a PHP script that prints the HTTP_REFERER. In case one it
works fine, but case two prints the wrong referer.

Expected Results:  
Have the referer be the document URL, not the base href.
Want to fix for b4, since a regression this cycle.
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: blocking1.8b4+
Target Milestone: --- → mozilla1.8beta4
> Want to fix for b4, since a regression this cycle.
Not sure when that regressed, then. I also see this in Mozilla/5.0 (Windows; U;
Windows NT 5.1; en-US; rv:1.8a5) Gecko/20041122.
Attached patch fixSplinter Review
Attachment #189457 - Flags: superreview?(bzbarsky)
Attachment #189457 - Flags: review?(bzbarsky)
By "this cycle", I meant since 1.7.
Comment on attachment 189457 [details] [diff] [review]
fix

r+sr=bzbarsky, but I'd also be fine with storing mURI on the scanner
unconditionally and exposing a getter for it; seems a little silly to store the
same URI in both places...
Attachment #189457 - Flags: superreview?(bzbarsky)
Attachment #189457 - Flags: superreview+
Attachment #189457 - Flags: review?(bzbarsky)
Attachment #189457 - Flags: review+
Attachment #189457 - Flags: approval1.8b4? → approval1.8b4+
Fix checked in to trunk, 2005-07-19 13:44 -0700.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Summary: "&lt;base href&gt;" and background: url(); send the wrong referer for the image request → <base href> and background: url(); send the wrong referer for the image request
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: