5/6/2019»»Monday

How To Open Application Octet Stream

5/6/2019
    42 - Comments
  1. Open Application Octet Stream In Browser
  2. How To Open Application Octet Stream Files

I'm using Firefox 41.0.1 on Fedora 22.

I noticed this behaviour when I was trying to open a PNG image link on a GitLab site. The server replies with 'Content-Disposition:'inline; filename='logo.png' and Content-Type:'application/octet-stream'.

I want it to either display the image on the browser, or offer me to open it on the system default image viewer. I know it is possible, at least in Windows. See the GIF below kindly provided by @JourneymanGeek:

I made some tests using this tool and, apparently, when I click a link and the response headers contains the application/octet-stream mime type, Firefox offers me to open the file using gedit, stating it's the default application.

  • If I download the file (in this case, a PNG image) and double-click on it, it opens on Eye of Gnome.
  • xdg-open also opens it in Eye of Gnome.
  • application/octet-stream isn't present on /usr/share/applications/defaults.list
  • $ grep 'gedit' /usr/share/applications/defaults.list returns only text/plain=org.gnome.gedit.desktop
  • I have removed the ~/.mozilla/firefox/<profile>/mimeTypes.rdf file and the issue persits.
  • I have also removed the ~/.local/share/applications/mimeapps.list file and the issue still persists.
  • I have restarted Firefox and logged out of my Gnome profile as well.

Here's the Firefox file association screen:

So, again, my question is: is it possible to have Firefox either display the file on the browser (if it is a file it's able of rendering), or offering the correct application able of rendering it (if there's one on the system)?

Or does the server declaring the incorrect mime-type renders it all impossible?

Also, why is it thinking gedit is the default octet-stream handler? Is this correct?

That Brazilian Guy
That Brazilian GuyThat Brazilian Guy

3 Answers

I have also removed the ~/.local/share/applications/mimeapps.list file and the issue still persists.

Application octet stream file extension

There is likely another mimeapps.list elsewhere on the system. You can go through the list here, or search through your system with one of the following commands:

or

Check for any application/octet-stream entries in those, and either comment them out or remove them.

BobBob

Well, seems that Firefox will not fix this issue but I fixed it in my way removing the application/octet-stream=org.gnome.gedit.desktop from my ~/.config/mimeapps.list and using the add-on OpenDownload² to provide me the Run option.

If the extension of the file being downloaded is correctly configured in the mimeapps.list, firefox will open (run) it like a charm.

Geyslan G. BemGeyslan G. Bem

@Bob answered part 2 of the question: how to control which app opens the file.

The answer to part 1 is: Firefox downloads all files of type application/octet-stream by design. According to the HTTP standard, a compliant browser MUST NOT second-guess the server if a content-type is specified. Since octet-stream files contain arbitrary data, the browser should download them.

Most browsers ignore the standard in favor of user friendliness. Firefox does not. As stated in @Geyslan's answer, you would need to use a 3rd party extension to circumvent this design choice.

Foo BarFoo Bar

Not the answer you're looking for? Browse other questions tagged linuxfirefoxfedoragnomemime-types or ask your own question.

application/octet-stream

MIME Type: application/octet-stream
MIME Content Type:Application
Associated File Extensions:pkg files, lha files, lzh files, bin files, lrf files, mar files, class files, dylib files, elc files, so files, dmg files, dms files, bpk files, exe files, pgp files, ani files, dll files, deploy files, dist files, distz files, dump files

Any general, binary format that the server doesn't recognize usually uses this MIME type. Upon receiving this type, most browsers prompt the user and give the user an option to save to disk. RFC1521, Borenstein


Compatible with Windows 10, 8, 7, Vista, XP and 2000

Optional Offer for WinThruster by Solvusoft EULA Privacy Policy Terms Uninstall


What Are MIME Types?

A Multi-Purpose Internet Mail Extension (eg. “application/octet-stream”), also known as a MIME, is type of Internet standard originally developed to allow the exchange of different types of data files through e-mail messages. MIME types like application/octet-stream are classified into specific data categories such as Video, Audio, Image, and many more. This categorization provides instructions to your computer or mobile device about how these files should be opened / viewed.

Why Do I Need MIME Types Like application/octet-stream?

Categorizing MIME types like application/octet-stream into a data type such as “Application” allows your e-mail client or Internet browser to display the content as intended. For example, when you attach a digital camera photo file to an e-mail, an Image MIME type will be associated with that file to allow your recipient to view the photograph.

Here's how it works: Web servers (computers that host websites and e-mail) insert a set of MIME instructions into the beginning of a data transmission, such as an e-mail message or webpage, in the following format:

Content-Type: application/octet-stream

[Format Explanation: The MIME type, which in this example is “Application”, is separated by a forward slash (“/”) and followed by a subtype.]

File

This set of instructions tells your client application, such as an e-mail program (eg. Microsoft Outlook, Apple Mail) or web browser (eg. Adobe premiere pro cs6 download full version. Google Chrome, Mozilla Firefox), which “player application” should be used to properly display the application/octet-stream content.

Many modern web browsers include built-in components to display common data types such as image players (eg. GIF, JPEG), Adobe Flash Player, Javascript, and many more. Other less-common types of players must be downloaded separately in order to properly display the MIME content.

What Are The Most Common Problems Associated With application/octet-stream?

Sometimes you’ll find that your web browser or e-mail client is unable to properly display your application/octet-stream content. This could be due to one of two reasons:

1. You are missing the proper Application “player software” to display the application/octet-stream content.

2. Your Windows Registry contains an incorrect file extension (eg. XLS, PDF) association with the application/octet-stream MIME type.

How To Fix application/octet-stream Issues

Open Application Octet Stream In Browser

Do I have the application/octet-stream “player application” installed?

The first step in troubleshooting issues with opening application/octet-stream content is to first make sure that you have the correct “player application” installed for this MIME type. Because there can be several (or even hundreds) of related software applications to application/octet-stream, it is very difficult for us to compile a comprehensive list.

Therefore, a key strategy in determining the correct application is to look for clues on what software programs might be related to application/octet-stream. Look at the naming of the subtype for clues about a related program (eg. Word, Excel) or software developer name (eg. Microsoft).

Stream

Furthermore, if you’ve been sent MIME type application/octet-stream as an e-mail attachment, look for the file extension of the attached file. This file extension (eg. PKG, LHA, LZH, etc.) can provide you with a clue of what “player application” is associated with this Application MIME. Take a look at our file extension list below to see if there are any clues to finding the right “player application”.

Do I have broken application/octet-stream file associations?

The second step in troubleshooting application/octet-stream issues is making sure that you have correct file associations in the Windows Registry. Installing and uninstalling programs can lead to incorrect file associations with application/octet-stream. Take a look at your Windows Registry settings to ensure that the MIME type is correctly associated with the “player application” and file extension.

WARNING: DO NOT edit the Windows Registry unless you are an advanced computer user with experience editing the Registry. Making an error in editing the Registry can create irreversible damage to your PC.

How To Open Application Octet Stream Files

If you are not comfortable editing the Windows Registry, we highly recommend using an automated registry cleaning program, or taking you computer to a qualified professional.