Application Octet Stream

Dear Neledn,
Thank you for sharing screenshot.
I have checked my account and I cannot see anything similar. Does this attachment appear every time you are composing a new email ?
Please try the following: Try to use another browser, and In Private mode. Sometimes extensions or cookies can block authorization and cause problems. It is also recommended to clear cache and cookies from time to time. In this article you will find the way how to delete the cache and cookies for most of the browsers https://www.wikihow.com/Delete-Tracking-Cookies
It is better to avoid Safari, Firefox and Chrome for this as there are lots of problems with browsers recently https://support.office.com/en-us/article/fixes-... That is why please test this in Microsoft Edge and Internet Explorer in Private (CTRL+SHIFT+P)
After you will login to your account in Private browsing, please try to compose a new email. Please check if you will see the same attachment. Also, please send a test email to yourself. When you will be sending, please pay attention if it will appear and if it will be visible in received email.
Please share the results!
Note: This is a non-Microsoft website. The page appears to be providing accurate, safe information. Watch out for ads on the site that may advertise products frequently classified as a PUP (Potentially Unwanted Products). Thoroughly research any product advertised on the site before you decide to download and install it.
Active10 days ago

Append the extension '.exe' if you need to run a file as an application, rather than as a document in another program. Files that appear as octet-stream files are often applications, but you should only run a downloaded application if you trust its source. A number of us are using a private site where we run an application offline. The application offers a download button so that we can take a snapshot of our offline progress, a sort of backup. Application/octet-stream is the default value for a binary file. The meaning of this MIME type is “unknown binary” file. It represents any kind of binary data.

Feb 14, 2019  Clients MAY ignore this content-type. 2.2.1.2.1 application/octet-stream. 2/14/2019; 2 minutes to read; In this article. HTTP's Content-Encoding header only applies to how data is encoded inside of the HTTP message itself, not how the data itself is encoded outside of HTTP. There is no Content-Encoding header present in your example, so HTTP is not encoding the data in any way, it is giving you the raw data as-is.

The HTTP standard says:

If this header [Content-Disposition: attachment] is used in a response with the application/octet-stream content-type, the implied suggestion is that the user agent should not display the response, but directly enter a `save response as...' dialog.

I read that as

But I would have thought that Content-Type would be application/pdf, image/png, etc.

Application Octet Stream

Should I have Content-Type: application/octet-stream if I want browsers to download the file?

Paul Draper
Paul DraperPaul Draper

C# Application Octet Stream

Octet
46.1k30 gold badges144 silver badges220 bronze badges

1 Answer

No.

The content-type should be whatever it is known to be, if you know it. application/octet-stream is defined as 'arbitrary binary data' in RFC 2046, and there's a definite overlap here of it being appropriate for entities whose sole intended purpose is to be saved to disk, and from that point on be outside of anything 'webby'. Or to look at it from another direction; the only thing one can safely do with application/octet-stream is to save it to file and hope someone else knows what it's for.

You can combine the use of Content-Disposition with other content-types, such as image/png or even text/html to indicate you want saving rather than display. It used to be the case that some browsers would ignore it in the case of text/html but I think this was some long time ago at this point (and I'm going to bed soon so I'm not going to start testing a whole bunch of browsers right now; maybe later).

RFC 2616 also mentions the possibility of extension tokens, and these days most browsers recognise inline to mean you do want the entity displayed if possible (that is, if it's a type the browser knows how to display, otherwise it's got no choice in the matter). This is of course the default behaviour anyway, but it means that you can include the filename part of the header, which browsers will use (perhaps with some adjustment so file-extensions match local system norms for the content-type in question, perhaps not) as the suggestion if the user tries to save.

Hence:

File Extension Application Octet Stream

Means 'I don't know what the hell this is. Please save it as a file, preferably named picture.png'.

Means 'This is a PNG image. Please save it as a file, preferably named picture.png'.

Means 'This is a PNG image. Please display it unless you don't know how to display PNG images. Otherwise, or if the user chooses to save it, we recommend the name picture.png for the file you save it as'.

Of those browsers that recognise inline some would always use it, while others would use it if the user had selected 'save link as' but not if they'd selected 'save' while viewing (or at least IE used to be like that, it may have changed some years ago).

Jon Hanna

Application Octet Stream Vs Text Plain

Jon Hanna
94.6k9 gold badges119 silver badges218 bronze badges

protected by Rachel GallenMar 15 at 8:50

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?

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