"application/octet-stream" should give you "save-as" dialog

RESOLVED WORKSFORME

Status

Core Graveyard
File Handling
P3
normal
RESOLVED WORKSFORME
18 years ago
2 years ago

People

(Reporter: Henrik Gemal, Assigned: Bill Law)

Tracking

Trunk
mozilla1.1alpha

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

18 years ago
Currently when you download a file of type "application/octet-stream" you're 
presented with the "Unknown File Type" dialog.
I think you should be presented with the "Save As" dialog like in 4.x

Build 2000060720 on Win2k
Reassign to networking..is this the right component?
Assignee: mstoltz → gagan
Component: Security: General → Networking
QA Contact: czhang → tever

Comment 2

18 years ago
The unknown file type is handled by the unknown (as yet) hero-- law! :) Come on 
bill... here is your chance to fame and fortune :)
Assignee: gagan → law
(Assignee)

Comment 3

18 years ago
Communicator on Mac doesn't handle application/octet-stream specially.  I don't 
know why that is, but maybe doing as suggested isn't *always* the right thing?

This sounds plausible because application/octet-stream is basically just random 
binary data, the meaning of which is usually implied by the file extension 
(.exe, .dll, etc.).

I'm setting this to M20.  It is easy to implement (and could even be implemented 
differently for windows only if we liked).  I'd like consensus on this first, 
given the differences in the Communicator behavior on Mac vs. Windows.

What does Communicator on Unix do?
Status: NEW → ASSIGNED

Comment 4

18 years ago
Running linux (debian 2.2 potato latest updated) Mozilla build version 
2000071714

Hey everyone.  I have found this bug its pretty annoying and pretty serious 
sometimes.  It depends from site to site.  For example, If i go to 
http://bb.themes.org or http://e.themes.org i can't download the themes at all 
with netscape.  This is what happens when I click on the theme file to be 
downloaded (its a *.tar.gz file).  Lets go step by step (go to bb.themes.org) 
on the right side there are theme names ..click on anyone ..now it will take 
you to a different screen.  This page is like a summary for the theme.  Now on 
that page you will see a Download section ..under it there will be a link (it 
will say Quick) click on that. Don't right click on that, I will get on that 
later..but for now click on that.  

Once clicked you will see a window pops up --> It says This file has mime type 
application/octet-stream and cannot be viewed using Mozilla.  You can open it 
with another application, or save it to disk.  

I want to save it ..so i click on Save to disk button in that window and 
clicked on ok after that.

Then another window pops up --> Its heading is Enter name of file to save to

So i chose directories where I want to save the file.  But before choosing the 
directory, I notice that the mozilla automatically attaches .exe extension to 
a .tar.gz file.  So i remove the .exe and leave the origianal file name intact 
and carry on the process of chosing directories to save the file to.  I chose a 
directory and hit ok.  Then nothing happens.  That window disappers and I am 
again left with the first window which popped up when I try to download the 
file.  Its says on that window --> This file has mime type application/octet 
stream and cannot be viewed using Mozilla (the same first window as I described 
earlier).

Then I tried again but this time I let mozilla's download window to keep that 
automatically added exe extension to the file.  Same thing ..it does not 
download ..it just takes me back to that windows which says --> This file has 
mime type application/octet-stream and cannot be viewed using Mozilla.  

So after that I tried to do right click on the url this time.  It says 
download.html file to be saved ..so i believe in this site I can't right click 
on the Quick (url) on the page of the theme..it has to be clicked to download 
it.  I got the same error in e.themes.org also but downloading files worked in 
http://www.freshmeat.net because over there i get direct link to file .  A 
window pops up and says Save as ...and another window pops up where to save it 
and it works.

So I advice you go to these sites and try to download files following my method.

Also a similar bug was reported in bug #41899 please check that one also for 
reference.  In my opinon this is pretty major bug.  

I know this has no refrence but i also used ie5 in my windows box to download 
the file ..it worked ...(i know this has nothing to do with mozilla ..but I am 
just saying ..i checked it in many ways)

again i am running
linux (debian 2.2 potato latest updated) Mozilla build version 2000071714

Updated

18 years ago
OS: Windows 2000 → All
Hardware: PC → All

Comment 5

18 years ago
Testing with 2000071720 On a basic RH 6.2 Gnome install. Followed linunix's
instructions. Clicked on quick, URL of file appeared in URL bar, it didn't load
it for me though. I clicked on the url bar and pressed enter to load file url.
It loaded and popped up with the application/octet-stream can't be viewed, so I
clicked save-as. It appeared with the proper file name nad I clicked OK to save.
The download bar appeared, then quickly went away. After being shocked for a
second I discovered that it had accually saved the file (it was just a very
small file) properly.  So only problem I saw was the fact that the file name
appeared in the url bar, which I assume is a problem with the quick button or
its handling rather than the octet-stream recognition.

linunix: check to see if the file is not accually in the directory anyways??

Comment 6

18 years ago
johnlar@tfn.net: negative.  I am testing with 2000071910, and got exactly the
same result as what linunix described: after clicking OK in the filepicker, no
file was saved.  I do have a little bit more info.  After clicking OK in the
filepicker, I got the following Javascript error:

JavaScript error:
 line 0: uncaught exception: [Exception... "Component returned failure code:
0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIHelperAppLauncher.saveToDisk]"
nsresult: "0x80004001 (NS_ERROR_NOT_IMPLEMENTED)"  location: "JS frame ::
chrome://global/content/helperAppLauncher.js :: anonymous :: line 102"  data: no]

Comment 7

18 years ago
I have chatted with a .themes.org employee and the method they use for most of
their file downloads is to send the data as a stream from download.html.
They do this using the following php code:

header("Content-disposition: inline; filename=".$name);
$path=fetch_object_path($object, $rev);
readfile($path);
exit;

What this does is send a stream of data to a file using the header
Content-disposition: inline; filename=<filename>

most of the .themes.org pages do not store the files as a URL on disk, instead
they just pass the browser a stream as a file to download.
(Reporter)

Comment 8

17 years ago
fixing this one could really save me some time.....:)
(Reporter)

Comment 9

17 years ago
law: you said fixing this one is easy.

IE and NS behaviour on Win:
Going to:
http://ftp.mozilla.org/pub/mozilla/nightly/latest/mozilla-win32-installer.exe
gives me the "save-as" dialog

What about Mac and Unix?

Comment 10

17 years ago
mass move, v2.
qa to me.
QA Contact: tever → benc
(Assignee)

Comment 11

17 years ago
Setting target milestone.
Target Milestone: --- → mozilla1.1
(Reporter)

Comment 12

16 years ago
works for me build 20020115
Status: ASSIGNED → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → WORKSFORME

Comment 13

15 years ago
-> file handling
Component: Networking → File Handling
QA Contact: benc → petersen
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.