private Method

HTTPResponse.read_chunked(dest)

There's no documentation for this item.

Source Code

# File net/http.rb, line 2220
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
    @socket.read len, dest; total += len
    @socket.read 2   # \r\n
  end
  until @socket.readline.empty?
    # none
  end
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.