Closed Bug 255848 Opened 20 years ago Closed 20 years ago

Sending HTTP Headers, Content-Disposition: attachment; filename=

Categories

(Toolkit :: Downloads API, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 221028

People

(Reporter: davidmcveigh, Assigned: bugs)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3

As a php developer I explicitly send HTTP Headers to accomplish file downloads.

<?php header("Content-Disposition: attachment; filename=".$fileName); ?>

If the filename property has spaces in the name ie "Filename with spaces.txt"
when control is passed to Firefox 0.9.3 to save or open the file, the filename
is truncated to the first occurance of a space ie "Filename".

Files can be open and saved, however the full filename is truncated and the file
extension is lost.



Reproducible: Always
Steps to Reproduce:
1.
2.
3.




As far as I can remember, this bug did not exist in earlier versions of Firefox.
dupe of bug 221028. You have to put quotes around the filename, like this :

<?php header("Content-Disposition: attachment; filename=\".$fileName\""); ?>


*** This bug has been marked as a duplicate of 221028 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Summary: Sending HTTP Headers, Content-Disposition: attachment; filename= → Sending HTTP Headers, Content-Disposition: attachment; filename=
sorry, that has to be :

<?php header("Content-Disposition: attachment; filename=\"$fileName\""); ?>
Status: RESOLVED → VERIFIED
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.