Guest User

Untitled

a guest
Oct 15th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. diff --git a/lib/Furl/HTTP.pm b/lib/Furl/HTTP.pm
  2. index e859786..69a3c16 100644
  3. --- a/lib/Furl/HTTP.pm
  4. +++ b/lib/Furl/HTTP.pm
  5. @@ -645,9 +645,12 @@ sub _read_body_chunked {
  6. READ_CHUNK: while ( $next_len+2 > length($buf) ) {
  7. my $n = $self->read_timeout( $sock,
  8. \$buf, $self->{bufsize}, length($buf), $timeout_at );
  9. - if ( not defined $n ) {
  10. + if (!$n) {
  11. return $self->_r500(
  12. - "Cannot read chunk: " . _strerror_or_timeout());
  13. + !defined($n)
  14. + ? "Cannot read chunk: " . _strerror_or_timeout()
  15. + : "Unexpected EOF while reading packets"
  16. + );
  17. }
  18. }
  19. $$res_content .= substr($buf, 0, $next_len);
Add Comment
Please, Sign In to add comment