diff --git a/lib/net/http/header.rb b/lib/net/http/header.rb index 6106e79..b5c13cc 100644 --- a/lib/net/http/header.rb +++ b/lib/net/http/header.rb @@ -773,8 +773,16 @@ def type_params list = self['Content-Type'].to_s.split(';') list.shift list.each do |param| - k, v = *param.split('=', 2) - result[k.strip] = v.strip + k, v = param.split('=', 2) + k.strip! + v.strip! + v.gsub!(/\A"(.*?)(? 'iso-2022-jp'}, @c.type_params) @c.content_type = 'text' assert_equal({}, @c.type_params) + @c['content-type'] = 'text/html; charset="UTF\-8"' + assert_equal({'charset' => 'UTF-8'}, @c.type_params) end def test_set_content_type