Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Sep 15, 2011
1 parent dadc7d3 commit 55cc262
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/Mojolicious/Controller.pm
Expand Up @@ -188,10 +188,11 @@ sub param {
sub redirect_to {
my $self = shift;

my $headers = $self->res->headers;
# Don't override 3xx status
my $res = $self->res;
my $headers = $res->headers;
$headers->location($self->url_for(@_)->to_abs);
$headers->content_length(0);
$self->rendered($self->res->is_status_class(300) ? undef : 302);
$self->rendered($res->is_status_class(300) ? undef : 302);

return $self;
}
Expand Down

0 comments on commit 55cc262

Please sign in to comment.