Rodster001 has asked for the wisdom of the Perl Monks concerning the following question:
I am having some problems with IE and how it is handling the Content-Disposition header (I am not the first as it would seem).
When clicking a link in a web page with a CGI that returns the Content-Disposition header, IE will display a dialogue box "Save Open Cancel". Save works fine (saving the file and then opening works). Open, however will open the helper application but the file is always not found.
I have done some searching on the Net about this and found a few posted topics but no answers. Any ideas? Workarounds?
Here is a stripped down sample HTML page and CGI so you can reproduce the error and see for yourself.
test.html:
<a href="test.cgi">Download</a>
test.cgi:
#!/usr/bin/perl use strict; print "Content-type: application/octet-stream\n"; print "Content-disposition: attachment; filename=big-test.csv\n\n"; print "Test,One,Two,Three\n"; exit;
Note: For this error to be produced as I am explaining it, you need both the HTML and CGI file. Opening the CGI directly in IE produces different results. Also, the Content-type header can be omitted and produces the same results. I won't bother mentioning that this works fine in Firefox... oh, oops ;)
As always, thank you in advance for any enlightenment!
|
---|