]> git.donarmstrong.com Git - debbugs.git/commitdiff
Add Last-Modified: header support to mbox download (closes: #456786)
authorDon Armstrong <don@donarmstrong.com>
Wed, 3 Dec 2008 04:10:53 +0000 (20:10 -0800)
committerDon Armstrong <don@donarmstrong.com>
Wed, 3 Dec 2008 04:10:53 +0000 (20:10 -0800)
cgi/bugreport.cgi
debian/changelog

index 46b2eb4b575d188b865d172a1f55d44782e18b0d..c50d58604722280f86924e3333ae30b8ed4193bf 100755 (executable)
@@ -159,13 +159,17 @@ my @log;
 if ( $mbox ) {
      my $date = strftime "%a %b %d %T %Y", localtime;
      if (@records > 1) {
-         print qq(Content-Disposition: attachment; filename="bug_${ref}.mbox"\n);
-         print "Content-Type: text/plain\n\n";
+        print $q->header(-type => "text/plain",
+                         content_disposition => qq(attachment; filename="bug_${ref}.mbox"),
+                         (length $mtime)?(-last_modified => $mtime):(),
+                        );
      }
      else {
          $msg_num++;
-         print qq(Content-Disposition: attachment; filename="bug_${ref}_message_${msg_num}.mbox"\n);
-         print "Content-Type: message/rfc822\n\n";
+         print $q->header(-type => "message/rfc822",
+                          content_disposition => qq(attachment; filename="bug_${ref}_message_${msg_num}.mbox"),
+                          (length $mtime)?(-last_modified => $mtime):(),
+                         );
      }
      if ($mbox_status_message and @records > 1) {
          my $status_message='';
index 8e289d5476709c2934dfe9edba1c32843b1d0eda..865fc14150ddaca567ba602aea107f53c7e0a449 100644 (file)
@@ -235,6 +235,7 @@ debbugs (2.4.2) UNRELEASED; urgency=low
   * Resolve two XSS (closes: #504608)
   * Strip BOM before regexes involving spaces (closes: #488554)
   * Display link to full log again (closes: #507506)
+  * Add Last-Modified: header support to mbox download (closes: #456786)
 
   
  -- Colin Watson <cjwatson@debian.org>  Fri, 20 Jun 2003 18:57:25 +0100