Skip to content

Commit

Permalink
Item2549: respect REDIRECT_STATUS only if it is not 2xx. Thanks MarcS…
Browse files Browse the repository at this point in the history
…CHAEFER.

git-svn-id: http://svn.foswiki.org/trunk/ModPerlEngineContrib@5921 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
GilmarSantosJr authored and GilmarSantosJr committed Jan 3, 2010
1 parent f706065 commit 8ad3c2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ModPerlEngineContrib/lib/Foswiki/Engine/Apache.pm
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,10 @@ sub finalizeHeaders {
my ( $this, $res, $req ) = @_;
$this->SUPER::finalizeHeaders( $res, $req );

# If REDIRECT_STATUS is present, preserve it. See Foswikitask:Item2549
# If REDIRECT_STATUS is useful, preserve it. See Foswikitask:Item2549
# and http://httpd.apache.org/docs/2.2/en/custom-error.html#custom
my $status;
if (defined $ENV{REDIRECT_STATUS}) {
if (defined $ENV{REDIRECT_STATUS} && $ENV{REDIRECT_STATUS} !~ /^2/o) {
$status = $ENV{REDIRECT_STATUS};
}
elsif (defined $res->status && $res->status =~ /^\s*(\d{3})/o) {
Expand Down

0 comments on commit 8ad3c2b

Please sign in to comment.