On Wed, 25 Feb 2004, Brian McCauley wrote:
> That question is not only frequently asked but also not in any way
> Perl related.
No disagreement there.
> application/octet-stream should do this.
[Where "do this" means "recipient's browser will offer to download
the data to a file".]
Downloading to file is a possible action, and indeed probably the
safest and best-advised action for a browser to take in such a case;
but it's arguable that application/octet-stream is the one and only
explicit HTTP content-type that /could/ imply "recipient is allowed to
guess" (it's not very clearly codified in the specs, beyond the
implication that octet-stream is an unspecified bag of bytes).
> You can also give hints via the content-disposition header.
Indeed.
> Some braindead browsers ignore the information given by the server.
(for some fairly constructive value of the term "ignore". Since
you're presumably referring to that operating system component that
thinks it's a web browser from MS, it actually goes through
considerable contortions before deciding - as it does in the majority
of practical cases - to violate RFC2616 by disregarding the
server-provided content-type.)
> That's even more off-topic here...
Yes; excuse me for just pointing up a couple of items that often cause
confusion and which I thought might have misled someone if they had
been left unremarked here.
> http://ppewww.ph.gla.ac.uk/~flavell/...tent-type.html
well, I do my best; but it's a complex puzzle that the dominant vendor
has visited on us in flagrant disregard of the interworking
specifications.
Of course the bottom line is that knowing what you want to do - in
terms of an HTTP protocol interchange etc. - is of little relevance to
Perl and to comp.lang.perl.misc, but when the hon Usenaut has decided
what to do, then c.l.p.m would be a reasonable place to find out how
to do it in Perl.
cheers