The ContentType (aka MIME) is coming in as application/octet-stream, no matter what browser I'm using (IE8, FF, Chrome, etc). I can't figure out why. MIME content-types supported by most web servers, identified with file extensions, are listed in the following. Application/octet-stream, uninterpreted binary, bin.
I have downloaded some log files from my server which I want to search for a specific string for debugging purposes. All of them have the.log extension. The problem is that one file has the plain text document (text/plain) mime type while the other has the Binary (application/octet-stream) mime type. I can open the plain text document (text/plain) mime type log file in a text editor as plain text but the other I can't since it's in binary. How can I view the binary.log files with application/octet-stream mime type? Based on your own answer, you seem to be referring specifically to searching files using grep, rather than to changing a file's mime-type - see.
If grep is simply misidentifying the files based on null bytes, then you can use the -a or -binary-files=text options to tell grep to treat them as text regardless, as described in the manual pages: -a, -text Process a binary file as if it were text; this is equivalent to the -binary-files=text option.binary-files=TYPE If the first few bytes of a file indicate that the file contains binary data, assume that the file is of type TYPE. By default, TYPE is binary, and grep normally outputs either a one-line message saying that a binary file matches, or no message if there is no match. If TYPE is without-match, grep assumes that a binary file does not match; this is equivalent to the -I option. If TYPE is text, grep processes a binary file as if it were text; this is equivalent to the -a option. Warning: grep -binary-files=text might output binary garbage, which can have nasty side effects if the output is a terminal and if the terminal driver interprets some of it as commands.
I just need to parse ODS documents, MS documents and PDF files. But I can't figure out what happens when the content type is not detected - application/octet-stream is default. I am trying to sync documents using Skydrive pro client with sharepoint online. When I was observing http traffic using fiddler I found content-type is 'application/octet-stream' which i am not able to understand as it has several sync bytes in b/w the file content.
How to parse. If this is not right forum to ask this question please let me know right forum, basically I would like to understand how Microsoft handles 'content-type application/octent-stream' to parse. Hi cnivass, as i remember from my college days, 'content-type application/octent-stream', is a MIME attachment type that is binary, and it indicates the file needs to be open by client application.
Perhaps, the details you may check this article: Regards, Aries Microsoft Online Community Support Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Hi cnivass, as i remember from my college days, 'content-type application/octent-stream', is a MIME attachment type that is binary, and it indicates the file needs to be open by client application. Perhaps, the details you may check this article: Regards, Aries Microsoft Online Community Support Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.