From bb9e28766fda181113c16df721f13413dded7265 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Sat, 14 Apr 2007 14:55:28 +0200 Subject: [PATCH] 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. --- cgi-bin/dispatcher.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.2