class HTTP::Connection

def read_headers!

Returns:
  • (void) -
def read_headers!
  loop do
    if read_more(BUFFER_SIZE) == :eof
      fail EOFError unless @parser.headers?
      break
    else
      break if @parser.headers?
    end
  end
  set_keep_alive
rescue IOError, Errno::ECONNRESET, Errno::EPIPE => e
  raise IOError, "problem making HTTP request: #{e}"
end