From: Frank Lichtenheld Date: Sat, 14 Apr 2007 12:55:28 +0000 (+0200) Subject: dispatcher: Fix handling of Packages::CGI::http_code vs. error page X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=bb9e28766fda181113c16df721f13413dded7265;p=deb%2Fpackages.git dispatcher: Fix handling of Packages::CGI::http_code vs. error page Only use http_code instead of the generic error page if it is not a code from the 2XX group. --- diff --git a/cgi-bin/dispatcher.pl b/cgi-bin/dispatcher.pl index db9d155..b563dc5 100755 --- a/cgi-bin/dispatcher.pl +++ b/cgi-bin/dispatcher.pl @@ -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