X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=cgi%2Fpkgreport.cgi;h=455df20cea2896c7f2645c601d59a14584ce50a4;hb=747a1435ec35ebac24e9e321e6b3b4afcc2bea7b;hp=d29c3abc7ff56943a7a0a2196be16e5560bda857;hpb=d61a76fc5e1b52929a02705c07ac03936fd14244;p=debbugs.git diff --git a/cgi/pkgreport.cgi b/cgi/pkgreport.cgi index d29c3ab..455df20 100755 --- a/cgi/pkgreport.cgi +++ b/cgi/pkgreport.cgi @@ -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 "\n";