http://qs321.pair.com?node_id=97083


in reply to Getting CGI to name a file it returns

what the heck is application/binary ? It's probably better to use application/octet-stream, which is an accepted MIME type (though it doesn't mean much).

And it's more likely that someone will have defined a handler for an accepted MIME type. For instance, I have one handler in my browser for application/octet-stream, and another handler for unknown MIME types. And they're different.

  • Comment on Re: Getting CGI to name a file it returns

Replies are listed 'Best First'.
Re: Re: Getting CGI to name a file it returns
by elbie (Curate) on Jul 16, 2001 at 21:14 UTC
    One thing I've noticed with Content-type: application/octet-stream is that certain browsers will still try and load the file in the browser instead of thowing up a save as dialog. (Certain versions of IE will do this.) I usually use application/unknown, although I'm not sure that it's 100% successful.
Re: Re: Getting CGI to name a file it returns
by Nitsuj (Hermit) on Jul 18, 2001 at 09:32 UTC
    Sure octet-stream means something. It means that the output should be read as a stream of octets rather than a stream of binary and that you should be able to rely on recieving an even set of octets rather than an number of bits that doesn't resolve to an even octet. Of course, this is imposed by the IP protocol, so anything that comes down the pipe is technically an "octet-stream." It could be an indication that the content is not to be interpretted with split bytes (which IS done elsewhere) and that it is probably not plaintext.

    Just Another Perl Backpacker
      I don't think there is a way to send partial octets in HTTP.

      update: re-phrased to not sound so sarcastic.