diff options
author | mark <mark> | 2010-01-19 03:24:27 +0000 |
---|---|---|
committer | mark <mark> | 2010-01-19 03:24:27 +0000 |
commit | 074f28c90479380eb0248e0b36f30c60bff40764 (patch) | |
tree | 42fe95334a7b45d7389b2fe58920cbbd1ff5d476 /httemplate/search | |
parent | df9864e8fa039c889005c01b05489fde8c836784 (diff) |
Fix mime type for CSV files, RT#1526
Diffstat (limited to 'httemplate/search')
-rw-r--r-- | httemplate/search/elements/search-csv.html | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/httemplate/search/elements/search-csv.html b/httemplate/search/elements/search-csv.html index 21822700e..9eb1b66d1 100644 --- a/httemplate/search/elements/search-csv.html +++ b/httemplate/search/elements/search-csv.html @@ -39,7 +39,10 @@ my $rows = $args{'rows'}; my %opt = %{ $args{'opt'} }; #http_header('Content-Type' => 'text/comma-separated-values' ); #IE chokes -http_header('Content-Type' => 'text/plain' ); +#http_header('Content-Type' => 'text/plain' ); +http_header('Content-Type' => 'text/csv' ); # So saith RFC 4180 +http_header('Content-Disposition' => + 'attachment;filename="'.($opt{'name'} || PL($opt{'name_singular'}) ).'.csv"'); my $quote_char = '"'; $quote_char = $opt{csv_quote} if exists($opt{csv_quote}); |