Closed Bug 199832 Opened 22 years ago Closed 22 years ago

Downloaded Filenames have ".cgi" postpended to them

Categories

(Core Graveyard :: File Handling, defect)

x86
Windows 98
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 65827

People

(Reporter: JKCole, Assigned: law)

References

()

Details

User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.2.1) Gecko/20021130 Build Identifier: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.2.1) Gecko/20021130 I noticed that Download Manager postpends ".cgi" extensions onto downloaded files (ex. setup.exe.cgi). This happened most recently with the above link, http://www.chami.com/html-kit/download/ - the "Enter Filename to save to..." dialog box's "Save As Type" dropdown automatically defaults to "*.cgi" for some reason. Reproducible: Always Steps to Reproduce: 1. Navigate to download URL 2. Begin download Actual Results: Downloaded file is named "HKSetup.exe.cgi" unless the "Save as Type" is reset manually to "All Files". Expected Results: Download Manager's "Enter Filename to Save to.." dialog box should default to "All Files" instead of "*.cgi".
In Preferences, Navigator, Helper Apps, do you have anything defined for application/octet-stream? Not sure why it would be set to .cgi there, but that would explain why downloaded files were all getting that extension. This is bug 189598. (please check if this is the case, and mark this bug as a duplicate as appropriate). You should upgrade to a newer version of Mozilla. Whichever bug you're seeing, this is better with the 1.3 releases, testing with the URL you gave.
I've got this problem as well, seems to (potentially) be related to pages supporting Java. I'm having it in Mozilla 1.2, Mozilla 1.3 (and also netscape 7.0 for that matter), where visiting some web pages (including my DLink 614+'s web interface) and saving a file will give me a filename.bin.cgi instead of filename.bin. I always see a dialog saying 'Open file with iexplore.exe' or 'save to disk' when this is happening. It may be Internet Explorer has taken preference on some kinds of script handling, or it may be the pages I'm using are optimized for IE and won't work properly with the mozilla core. Confirming as well that it's application/octet-stream being pointed to Explorer\iexplore.exe (but I didn't make this association). How is this association broken from IE and permanently repointed? Should I point it at the mozilla executable, or what?
Ah, fixing it is as simple as removing application/octet-stream from the helper list entirely. What causes this so I can avoid repeats?
.
Assignee: blakeross → law
Component: Download Manager → File Handling
Here's some php that will cause the extension to be wrong on file downloads. (I'm running Mozilla 1.5 RC2.) With the code commented out, Mozilla adds ".php" to the filename. If you uncomment the code and submit the form, it works properly. <?/* if ($_SERVER['REQUEST_METHOD']!="POST") { ?> <form method="post" action="ook.php"> <input type="text" name="foo"> <input type="submit"> </form> <? } else {*/ header("Content-Type: application/octet-stream"); header('Content-Disposition: attachment; filename="test.zip"'); readfile("test.zip"); //} ?>
this has been fixed in the meantime (but after 1.5) *** This bug has been marked as a duplicate of 65827 ***
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.