class Patron::Response

def determine_charset(header_data, body)

def determine_charset(header_data, body)
  header_data.match(charset_regex) || (body && body.match(charset_regex))
  charset = $1
  validate_charset(charset) ? charset : nil
end