projects
/
catagits/HTTP-Request-AsCGI.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
fix content-length for CGI scripts that don't print any headers
[catagits/HTTP-Request-AsCGI.git]
/
lib
/
HTTP
/
Request
/
AsCGI.pm
diff --git
a/lib/HTTP/Request/AsCGI.pm
b/lib/HTTP/Request/AsCGI.pm
index
355097d
..
decddd6
100644
(file)
--- 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);