Closed Bug 236194 Opened 21 years ago Closed 21 years ago

"Save Link to Disk" context menu item does not send HTTP referrer

Categories

(Toolkit :: Downloads API, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jhenry, Assigned: bugs)

References

()

Details

Attachments

(1 file)

User-Agent: Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040302 Firefox/0.8.0+ This is a Firefox spinoff of the SeaMonkey bug 196871. When right-clicking a link to a file (such as one of the files on the page I supplied in the URL field) and choosing Save Link to Disk, Firefox does not send the current page as the referrer, as it does when clicking the link normally. This is a problem on sites such as the one linked to, since they perform a check on the referrer to make sure it is coming from within their own site. In this case, Firefox downloads an HTML error message rather than the real file. The API change in bug 170722 lets us send a referrer when saving a file, and we should leverage that in Firefox. I have a patch. Reproducible: Always Steps to Reproduce: 1. Find a site that authenticates downloads based on the HTTP referrer. 2. Right click a link, Save Link to Disk. Actual Results: Receive an HTML page containing an error, or some other undesirable result. Expected Results: Download the correct file.
Attached patch Proposed patchSplinter Review
In my testing, this patch worked correctly.
Attachment #142739 - Flags: review?(bugs)
*** Bug 233652 has been marked as a duplicate of this bug. ***
*** Bug 223902 has been marked as a duplicate of this bug. ***
Comment on attachment 142739 [details] [diff] [review] Proposed patch r=mkaply. Nice fix. I'll get this in.
Attachment #142739 - Flags: review?(bugs) → review+
Fix checked in
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
*** Bug 235142 has been marked as a duplicate of this bug. ***
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: