Fix the case for body '0'
[catagits/Catalyst-Runtime.git] / lib / Catalyst.pm
index 45111ac..8e0f17f 100644 (file)
@@ -1857,7 +1857,7 @@ sub finalize_headers {
     }
 
     # Content-Length
-    if ( $response->body && !$response->content_length ) {
+    if ( defined $response->body && !$response->content_length ) {
 
         # get the length from a filehandle
         if ( blessed( $response->body ) && $response->body->can('read') || ref( $response->body ) eq 'GLOB' )