class HTTPClient::Session
def read_header
def read_header @content_length = nil @chunked = false @content_encoding = nil @chunk_length = 0 parse_header(@socket) # Header of the request has been parsed. @state = :DATA req = @requests.shift if req.header.request_method == 'HEAD' or no_message_body?(@status) @content_length = 0 if @next_connection @state = :WAIT else close end end @next_connection = false if !@content_length and !@chunked end