class Patron::Response
def initialize(url, status, redirect_count, raw_header_data, body, default_charset = nil)
def initialize(url, status, redirect_count, raw_header_data, body, default_charset = nil) @url = url.force_encoding(Encoding::ASCII) # the URL is always an ASCII subset, _always_. @status = status @redirect_count = redirect_count @body = body.force_encoding(Encoding::BINARY) if body header_data = decode_header_data(raw_header_data) parse_headers(header_data) @charset = charset_from_content_type end