# File lib/mechanize/http/content_disposition_parser.rb, line 84 def parse_parameters parameters = {} while true do return nil unless param = rfc_2045_token param.downcase return nil unless @scanner.scan(/=/) value = case param when /^filename$/ then rfc_2045_value when /^(creation|modification|read)-date$/ then Time.rfc822 rfc_2045_quoted_string when /^size$/ then @scanner.scan(/\d+/).to_i(10) else rfc_2045_value end return nil unless value parameters[param] = value spaces break if @scanner.eos? or not @scanner.scan(/;+/) spaces end parameters end