class Sinatra::Request::AcceptEntry

def initialize(entry)

def initialize(entry)
  params = entry.scan(HEADER_PARAM).map do |s|
    key, value = s.strip.split('=', 2)
    value = value[1..-2].gsub(/\\(.)/, '\1') if value.start_with?('"')
    [key, value]
  end
  @type = entry[/[^;]+/].delete(' ')
  @params = Hash[params]
  @q = @params.delete('q') { "1.0" }.to_f
end