SPUG: Content-Dispostion http header

Ben Reser ben at reser.org
Fri Feb 15 15:22:21 CST 2002


On Fri, Feb 15, 2002 at 11:42:19AM -0800, Dan Ebert wrote:
> 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?

Yep discussed on this list not very long ago.
I've attached the final resolution.

-- 
Ben Reser <ben at reser.org>
http://ben.reser.org

What difference does it make to the dead, the orphans, and the homeless,
whether the mad destruction is wrought under the name of totalitarianism
or the holy name of liberty and democracy? - Ghandi
-------------- next part --------------
An embedded message was scrubbed...
From: "Parr, Ryan" <Ryan.Parr at wwireless.com>
Subject: RE: SPUG: HTTP Headers
Date: Tue, 11 Dec 2001 12:12:13 -0800
Size: 5325
Url: http://mail.pm.org/archives/spug-list/attachments/20020215/9d52ea09/attachment.eml


More information about the spug-list mailing list