method

read

read(clen, dest, ignore_eof = false)
public

Reads clen bytes from the socket, inflates them, then writes them to dest. ignore_eof is passed down to Net::BufferedIO#read

Unlike Net::BufferedIO#read, this method returns more than clen bytes. At this time there is no way for a user of Net::HTTPResponse to read a specific number of bytes from the HTTP response body, so this internal API does not return the same number of bytes as were requested.

See bugs.ruby-lang.org/issues/6492 for further discussion.