Skip to content

Commit

Permalink
small optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Dec 1, 2012
1 parent 43b7148 commit 5874137
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/Mojolicious/Controller.pm
Expand Up @@ -182,9 +182,7 @@ sub render {
return Mojo::ByteStream->new($output) if $args->{partial};

# Prepare response
my $res = $self->res;
$res->body($output) unless $res->body;
my $headers = $res->headers;
my $headers = $self->res->body($output)->headers;
$headers->content_type($type) unless $headers->content_type;
return !!$self->rendered($stash->{status});
}
Expand Down

0 comments on commit 5874137

Please sign in to comment.