Created
May 30, 2012 01:06
-
-
Save kazeburo/2832003 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment