Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #167 from gjacobrobertson/master

Handle UTF characters in chunked bodies.
  • Loading branch information...
commit ddd141b30848a8c4df2dfa84602f80b5b8a5f362 2 parents 65cb283 + 5cff429
@nahi authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/httpclient/session.rb
View
5 lib/httpclient/session.rb
@@ -986,10 +986,11 @@ def read_body_chunked(&block)
return
end
timeout(@receive_timeout, ReceiveTimeoutError) do
- @socket.read(@chunk_length + 2, buf)
+ @socket.read(@chunk_length, buf)
+ @socket.read(2)
end
unless buf.empty?
- yield buf.slice(0, @chunk_length)
+ yield buf
end
end
end

0 comments on commit ddd141b

Please sign in to comment.
Something went wrong with that request. Please try again.