Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Getting CGI to name a file it returns

by bikeNomad (Priest)
on Jul 16, 2001 at 20:53 UTC ( #97083=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://97083]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2022-05-28 08:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (99 votes). Check out past polls.

    Notices?