Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which MIME type is correct for the .exe file?

I try to find which MIME type corresponds to the each extension and I get ambiguous results.

According to webdesign.about.com the correct MIME for exe is: application/octet-stream

According to freeformatter.com the correct MIME for exe is: application/x-msdownload and it says that application/octet-stream is MIME for bin extension.

According to iana.org the correct MIME for exe (or something called vnd.microsoft.portable-executable as I don't see exe there) is: application/vnd.microsoft.portable-executable

Which website is the most accurate because I don't know what kind of content type value I should expect on the server site in the HTTP header.

like image 846
Yoda Avatar asked Jan 04 '17 08:01

Yoda


People also ask

What is MIME type example?

MIME stands for Multipurpose Internet Mail Extensions. It's a way of identifying files on the Internet according to their nature and format. For example, using the Content-type header value defined in a HTTP response, the browser can open the file with the proper extension/plugin.


1 Answers

application/vnd.microsoft.portable-executable is a registered MIME type and its description matches what you want to use it for.

The x- prefix in application/x-msdownload indicates that it is experimental so it should generally be avoided: Especially if something standard is available as it in in this case.

application/octet-stream is for arbitary collections of bytes. It does match an executable file, but it isn't as specific as application/vnd.microsoft.portable-executable.

Use application/vnd.microsoft.portable-executable.

like image 72
Quentin Avatar answered Oct 01 '22 10:10

Quentin