[freeside-commits] freeside/httemplate/search/elements search-csv.html, 1.2, 1.3
Mark Wells
mark at wavetail.420.am
Mon Jan 18 19:24:29 PST 2010
Update of /home/cvs/cvsroot/freeside/httemplate/search/elements
In directory wavetail.420.am:/tmp/cvs-serv27965/httemplate/search/elements
Modified Files:
search-csv.html
Log Message:
Fix mime type for CSV files, RT#1526
Index: search-csv.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/elements/search-csv.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- search-csv.html 1 Nov 2009 22:12:56 -0000 1.2
+++ search-csv.html 19 Jan 2010 03:24:27 -0000 1.3
@@ -39,7 +39,10 @@
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});
More information about the freeside-commits
mailing list