Closed Bug 176930 Opened 22 years ago Closed 22 years ago

Download manager forces incorrect extension

Categories

(SeaMonkey :: Download & File Handling, defect)

x86
Windows 98
defect
Not set
trivial

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 144334

People

(Reporter: jon, Assigned: bugzilla)

References

()

Details

When downloading a file that was sent via a script, be it CGI, PHP, Perl or
such, the file extension is incorrect.  For example:

http://www.squirrelmail.org/countdl.php?fileurl=%2Fsnapshots%2Fsquirrelmail-20021026_0841-CVS.stable.tar.gz

The file extension for the above download should be .tar.gz, but it downloads as
.tar.gz.tar.  The same occurs with MPEG files if they are saves as .mpg, they
end up with the file extension .mpg.mpeg.  With certain scripts it even puts the
extension of the script on the file, for example a text file that was downloaded
via a PHP script would end up with the extension .txt.php.  An example of a
script that would do that is:

<?php

$location = 'test.txt';
header("Content-Type: application/octet-stream\n");
header("Content-disposition: attachment; filename=$file\n");
header("Content-transfer-encoding: binary\n");
header("Content-length: " . filesize($location) . "\n");

$fp = fopen($location,"r");
rewind($fp);
fpassthru($fp);

?>

*** This bug has been marked as a duplicate of 144334 ***
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
v.
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.