summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormark <mark>2010-01-19 03:25:22 +0000
committermark <mark>2010-01-19 03:25:22 +0000
commit6ec34c756c2750a3f14117aff95c38a60b8bd1b9 (patch)
tree3f187b54bf1a96fb4320473e23cc43bf7e025df6
parent51032955c8eee947e6bd8ff46b43a675c901f9c7 (diff)
Fix mime type for CSV files, RT#1526
-rw-r--r--httemplate/search/elements/search-csv.html5
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});