CGI "download" prompt?
cidolfas at rpgclassics.com
Fri Jul 25 16:19:16 CEST 2003
> Try setting the Content-Type: header to something other than text/html,
> such as: application/octet-stream
> I think that any browser that respects the mime type will prompt to save
> a file with this mime-type.
> YMMV, especially with IE, because that thing tends to try to act
> 'smart' and looks at the file extension to determine
> what to do with the file. It will likely just display it....
Hmm... this doesn't seem to work. The problem is, I think, that once I
include a "Location:" header to redirect the browser, the Content-type
doesn't apply to the place I'm redirecting to. However, I don't know of any
way to include a header in a plain file that isn't a CGI file (and that's
what I want, because I want to keep the filename). >_<
Does anyone else have any ideas?
More information about the Python-list