Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/lib/Furl/HTTP.pm b/lib/Furl/HTTP.pm
- index e859786..69a3c16 100644
- --- a/lib/Furl/HTTP.pm
- +++ b/lib/Furl/HTTP.pm
- @@ -645,9 +645,12 @@ sub _read_body_chunked {
- READ_CHUNK: while ( $next_len+2 > length($buf) ) {
- my $n = $self->read_timeout( $sock,
- \$buf, $self->{bufsize}, length($buf), $timeout_at );
- - if ( not defined $n ) {
- + if (!$n) {
- return $self->_r500(
- - "Cannot read chunk: " . _strerror_or_timeout());
- + !defined($n)
- + ? "Cannot read chunk: " . _strerror_or_timeout()
- + : "Unexpected EOF while reading packets"
- + );
- }
- }
- $$res_content .= substr($buf, 0, $next_len);
Add Comment
Please, Sign In to add comment