X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst.pm;h=5a34cc2dd2baeb8ef9ee7d9d9d247703c3d0156e;hp=173483a910fad1d15571c7056eb8adda6aa91d2e;hb=681086e7279935c38cae4b84264dc73b02b63df1;hpb=040835f08bfca3531f595fd29cd306aeb64f67da diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 173483a..5a34cc2 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -81,7 +81,7 @@ __PACKAGE__->stats_class('Catalyst::Stats'); # Remember to update this in Catalyst::Runtime as well! -our $VERSION = '5.80029'; +our $VERSION = '5.80030'; sub import { my ( $class, @arguments ) = @_; @@ -1862,7 +1862,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' ) @@ -2376,11 +2376,11 @@ sub prepare_write { my $c = shift; $c->engine->prepare_write( $c, @_ ) } =head2 $c->request_class -Returns or sets the request class. +Returns or sets the request class. Defaults to L. =head2 $c->response_class -Returns or sets the response class. +Returns or sets the response class. Defaults to L. =head2 $c->read( [$maxlength] )