Closed Bug 247651 Opened 21 years ago Closed 21 years ago

Downloading some files with spaces in file name: Firefox CUTS OFF file name after the first word!

Categories

(Toolkit :: Downloads API, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 221028

People

(Reporter: prodiz, Assigned: bugs)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040614 Firefox/0.8 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040614 Firefox/0.8 I use the below code on my page to allow downloading files stored in mySQL: header("Content-type: $type"); header("Content-length: $size"); header("Content-Disposition: attachment; filename=$name"); header("Content-Description: PHP Generated Data"); When $name is a file name with spaces in it (eg. $name="This is a long file name.txt"), FIREFOX will try to save this file as "This", with the rest (including extension) cut off. Maybe it's just my PHP code on the page that is wrong ("Content-Disposition: attachment; filename=$name"), but IE handles it correctly. Reproducible: Always Steps to Reproduce: 1.Use a PHP webpage with the above code (above headers and $name="A long file name.txt"). 2.Open the php file with Firefox, to download the file (attachment) Actual Results: filename was truncated Expected Results: not truncate :) As IE does.
If the filename has whitespace, it MUST be quoted. Else, it violates the RFC, and Mozilla does not play nice with violators ;) *** This bug has been marked as a duplicate of 221028 ***
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
Status: RESOLVED → VERIFIED
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.