You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by theshz <th...@gmail.com> on 2005/08/16 19:35:11 UTC

[users@httpd] output csv mime headers for downloading

Hi, I'm trying to allow my users to download a csv file, and am hoping with
the correct header, the
browser will offer to download rather than display the content. I added the
".csv" extension to mime.types
next to ".xls" as "application/vnd.ms-excel xls csv", but the browser
(firefox) still displays the content
rather than offering for download. If I use ".xls", all works fine. What am
I doing wrong?

Thanks.

theshz


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] output csv mime headers for downloading

Posted by Joshua Slive <js...@gmail.com>.
On 8/16/05, theshz <th...@gmail.com> wrote:
> Hi, I'm trying to allow my users to download a csv file, and am hoping with
> the correct header, the
> browser will offer to download rather than display the content. I added the
> ".csv" extension to mime.types
> next to ".xls" as "application/vnd.ms-excel xls csv", but the browser
> (firefox) still displays the content
> rather than offering for download. If I use ".xls", all works fine. What am
> I doing wrong?

Have you inspected the actual Content-Type header being returned by
the server?  It probably hasn't changed, which probably means that you
aren't editting the right config file or you aren't restarting httpd
after making the changes.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org