]> git.deb.at Git - deb/packages.git/commitdiff
dispatcher: Fix handling of Packages::CGI::http_code vs. error page
authorFrank Lichtenheld <frank@lichtenheld.de>
Sat, 14 Apr 2007 12:55:28 +0000 (14:55 +0200)
committerFrank Lichtenheld <frank@lichtenheld.de>
Sat, 14 Apr 2007 12:55:28 +0000 (14:55 +0200)
Only use http_code instead of the generic error page if it is
not a code from the 2XX group.

cgi-bin/dispatcher.pl

index db9d155356e17ab9c761412d34e89b2a8c1d36c1..b563dc55ba464197075a980abe1df45e75d9d295 100755 (executable)
@@ -295,7 +295,7 @@ unless (@Packages::CGI::fatal_errors) {
     my $tet1 = new Benchmark;
     my $tetd = timediff($tet1, $tet0);
     print $template->trailer( undef, undef, undef, $tetd );
-} elsif ($Packages::CGI::http_code) {
+} elsif ($Packages::CGI::http_code && $Packages::CGI::http_code !~ /^2\d\d/) {
     print $input->header( -charset => $charset, -status => $Packages::CGI::http_code );
 } else {
     # We currently have only an error page in html