Skip to content

Commit

Permalink
no need to check twice
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Nov 21, 2014
1 parent 67fa439 commit 31a45d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Mojo/Message.pm
Expand Up @@ -99,8 +99,8 @@ sub fix_headers {
# Content-Length or Connection (unless chunked transfer encoding is used)
my $content = $self->content;
my $headers = $content->headers;
$headers->remove('Content-Length') if $content->is_multipart;
return $self if $content->is_chunked || $headers->content_length;
if ($content->is_multipart) { $headers->remove('Content-Length') }
elsif ($content->is_chunked || $headers->content_length) { return $self }
if ($content->is_dynamic) { $headers->connection('close') }
else { $headers->content_length($self->body_size) }

Expand Down

0 comments on commit 31a45d4

Please sign in to comment.