diff --git a/lib/WebGUI/Session/Http.pm b/lib/WebGUI/Session/Http.pm index cd1e5addc..7aa96e81c 100644 --- a/lib/WebGUI/Session/Http.pm +++ b/lib/WebGUI/Session/Http.pm @@ -510,12 +510,25 @@ sub setRedirect { my @params = $self->session->form->param; return undef if ($url eq $self->session->url->page() && scalar(@params) < 1); # prevent redirecting to self $self->session->errorHandler->info("Redirecting to $url"); - $self->{_http}{location} = $url; + $self->setRedirectLocation($url); $self->setStatus("302", "Redirect"); $self->session->style->setMeta({"http-equiv"=>"refresh",content=>"0; URL=".$url}); } +#------------------------------------------------------------------- + +=head2 setRedirectLocation ( url ) + +Sets the HTTP redirect URL. + +=cut + +sub setRedirectLocation { + my $self = shift; + $self->{_http}{location} = shift; +} + #------------------------------------------------------------------- =head2 setStatus ( code, description )