diff options
author | gerv%gerv.net <> | 2004-04-06 06:53:10 +0200 |
---|---|---|
committer | gerv%gerv.net <> | 2004-04-06 06:53:10 +0200 |
commit | 9efdf77d17bb89a4e9a82081b5412f42e63879ee (patch) | |
tree | 0769d9b1b7acc835571f92eb906dad58820238e3 /buglist.cgi | |
parent | 2eae8e3ac23f3e24e69eb1151b1005830dbd7fe5 (diff) | |
download | bugzilla-9efdf77d17bb89a4e9a82081b5412f42e63879ee.tar.gz bugzilla-9efdf77d17bb89a4e9a82081b5412f42e63879ee.tar.xz |
Bug 230293 - Send CSV buglists with "Content-Disposition: attachment". Patch by gerv; r,a=justdave.
Diffstat (limited to 'buglist.cgi')
-rwxr-xr-x | buglist.cgi | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/buglist.cgi b/buglist.cgi index 64d7beed0..032ce02bc 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -866,6 +866,7 @@ if ($dotweak) { # Generate HTTP headers my $contenttype; +my $disp = "inline"; if ($format->{'extension'} eq "html") { my $cookiepath = Param("cookiepath"); @@ -894,6 +895,12 @@ else { $contenttype = $format->{'ctype'}; } +if ($format->{'extension'} eq "csv") { + # We set CSV files to be downloaded, as they are designed for importing + # into other programs. + $disp = "attachment"; +} + if ($serverpush) { print $cgi->multipart_start(-type=>$contenttype); } else { @@ -901,7 +908,7 @@ if ($serverpush) { # If we are doing server push, then we did this already in the HTTP headers # that started the server push, so we don't have to do it again here. print $cgi->header(-type => $contenttype, - -content_disposition => "inline; filename=$filename"); + -content_disposition => "$disp; filename=$filename"); } |