class HTTPClient::Session
def parse_content_header(key, value)
def parse_content_header(key, value) key = key.downcase case key when 'content-length' @content_length = value.to_i when 'content-encoding' @content_encoding = value.downcase when 'transfer-encoding' if value.downcase == 'chunked' @chunked = true @chunk_length = 0 @content_length = nil end when 'connection', 'proxy-connection' if value.downcase == 'keep-alive' @next_connection = true else @next_connection = false end end end