method
read_chunked
read_chunked(dest)
private
Hide source
# File lib/net/http.rb, line 2766 def read_chunked(dest) len = nil total = 0 while true line = @socket.readline hexlen = line.slice(/[0-9a-fA-F]+/) or raise HTTPBadResponse, "wrong chunk size line: #{line}" len = hexlen.hex break if len == 0 begin @socket.read len, dest ensure total += len @socket.read 2 # \r\n end end until @socket.readline.empty? # none end end