X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst.pm;h=8a1c791dc740a8a6cd756afb78494215766d1ea2;hb=ac057d3b3f09bb43ce8730fbc0b3a12a4be5c774;hp=45111ace43bb472fc7e09b47973948e506f72bbd;hpb=3f87d500fcefaaf71ecf1f6a7290266089b1e2e6;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 45111ac..8a1c791 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -1857,7 +1857,7 @@ sub finalize_headers { } # Content-Length - if ( $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' )