]> git.donarmstrong.com Git - debbugs.git/blobdiff - cgi/pkgreport.cgi
Fix breakage caused by cdn.libravatar.org not setting Content-Type
[debbugs.git] / cgi / pkgreport.cgi
index d29c3abc7ff56943a7a0a2196be16e5560bda857..455df20cea2896c7f2645c601d59a14584ce50a4 100755 (executable)
@@ -18,9 +18,7 @@ BEGIN{
     delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};
 }
 
-# STDOUT should be in utf8 mode
-binmode(STDOUT,':utf8');
-
+binmode(STDOUT,':encoding(UTF-8)');
 use POSIX qw(strftime nice);
 
 use Debbugs::Config qw(:globals :text :config);
@@ -277,7 +275,8 @@ if (defined $param{usertag}) {
      }
 }
 
-quitcgi("You have to choose something to select by") unless grep {exists $param{$_}} keys %package_search_keys;
+quitcgi("You have to choose something to select by", '400 Bad Request')
+  unless grep {exists $param{$_}} keys %package_search_keys;
 
 
 my $Archived = $param{archive} ? " Archived" : "";
@@ -438,6 +437,7 @@ my $result = pkg_htmlizebugs(bugs => \@bugs,
                             (exists $param{dist})?(dist    => $param{dist}):(),
                            );
 
+print "Cache-Control: public, max-age=300\n";
 print "Content-Type: text/html; charset=utf-8\n\n";
 
 print "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";