summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/CGI.pm16
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/CGI.pm b/lib/CGI.pm
index 19e1f018e5..0c869d7262 100644
--- a/lib/CGI.pm
+++ b/lib/CGI.pm
@@ -29,7 +29,7 @@ $AUTOLOAD_DEBUG=0;
$NPH=0;
$CGI::revision = '$Id: CGI.pm,v 2.32 1997/3/19 10:10 lstein Exp $';
-$CGI::VERSION='2.3201';
+$CGI::VERSION='2.3202';
# OVERRIDE THE OS HERE IF CGI.pm GUESSES WRONG
# $OS = 'UNIX';
@@ -986,25 +986,23 @@ END_OF_FUNC
'redirect' => <<'END_OF_FUNC',
sub redirect {
my($self,@p) = self_or_default(@_);
- my($url,$target,$cookie,$nph,@other) = $self->rearrange([[URI,URL],TARGET,COOKIE,NPH],@p);
+ my($url,$target,$cookie,$nph,@other) =
+ $self->rearrange([[URI,URL],TARGET,COOKIE,NPH],@p);
$url = $url || $self->self_url;
my(@o);
foreach (@other) { push(@o,split("=")); }
- if($MOD_PERL or exists $self->{'.req'}) {
+ if ($MOD_PERL or exists $self->{'.req'}) {
my $r = $self->{'.req'} || Apache->request;
$r->header_out(Location => $url);
$r->err_header_out(Location => $url);
$r->status(302);
return;
}
- else {
- push(@o,
+ push(@o,
'-Status'=>'302 Found',
'-Location'=>$url,
- '-nph'=>($nph||$NPH),
- );
- }
- push(@o, '-URI'=>$url);
+ '-URI'=>$url,
+ '-nph'=>($nph||$NPH));
push(@o,'-Target'=>$target) if $target;
push(@o,'-Cookie'=>$cookie) if $cookie;
return $self->header(@o);