X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FHTTP%2FRequest%2FAsCGI.pm;fp=lib%2FHTTP%2FRequest%2FAsCGI.pm;h=decddd63e87b2a02307ad3eefb912921d4fca1b2;hb=292e2b640321653dbbca0a5f04a5767eed54d085;hp=355097d3310856592b6cb82be80641279bdddc20;hpb=bbe20ee9c92bc9db1960822b7c279a4cad1168aa;p=catagits%2FHTTP-Request-AsCGI.git diff --git a/lib/HTTP/Request/AsCGI.pm b/lib/HTTP/Request/AsCGI.pm index 355097d..decddd6 100644 --- a/lib/HTTP/Request/AsCGI.pm +++ b/lib/HTTP/Request/AsCGI.pm @@ -236,7 +236,7 @@ sub response { } else { - my $length = 0; + my $length = defined $response->content ? length( $response->content ) : 0; while ( $self->stdout->read( my $buffer, 4096 ) ) { $length += length($buffer);