X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst.pm;h=8a1c791dc740a8a6cd756afb78494215766d1ea2;hb=ac057d3b3f09bb43ce8730fbc0b3a12a4be5c774;hp=8e0f17fde1082db516bfc398ec2c7ff4418b40ff;hpb=bcc7361a26b0c7a55eb6b4d49d4622367b12f809;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 8e0f17f..8a1c791 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -1857,7 +1857,7 @@ sub finalize_headers { } # Content-Length - if ( defined $response->body && !$response->content_length ) { + if ( defined $response->body && length $response->body && !$response->content_length ) { # get the length from a filehandle if ( blessed( $response->body ) && $response->body->can('read') || ref( $response->body ) eq 'GLOB' )