SPUG: Content-Dispostion http header
Dan Ebert
mathin at mathin.com
Fri Feb 15 13:42:19 CST 2002
OK, this isn't really a perl question ... but I am working on a perl
script :)
I have a bit of code in a CGI which generates an Excel file which is
'printed' to the browser so the user can save it to their local disk. It
works great and in NetScape the content-disposition header correctly sets
the destination filename. In IE it sets the name to the name of the CGI
script.
print $cgi->header(-type => 'app1icati0n/0ctet-stream',
-content_disposition => 'file; filename='. $filename);
(one = ell, zero = o)
For those not familiar with the CGI module, this generates a header like
so:
Content-type: app1icati0n/0ctet-stream
Content-disposition: file; filename=destination.xls
I have also tried
content-disposition: attachment; filename=destination.xls
no dice.
Has anyone ran into this before?
Dan.
----------------------------------------------------------
Immigration is the sincerest form of flattery.
- Unknown
----------------------------------------------------------
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Subscriptions; Email to majordomo at pm.org: ACTION LIST EMAIL
Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest
Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org
More information about the spug-list
mailing list