From 02c341c9bc5879eae568ed2ba02cf227ed948199 Mon Sep 17 00:00:00 2001 From: usa Date: Wed, 24 Nov 2021 11:41:55 +0000 Subject: When parsing cookies, only decode the values git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/cgi/test_cgi_cookie.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/cgi/test_cgi_cookie.rb') diff --git a/test/cgi/test_cgi_cookie.rb b/test/cgi/test_cgi_cookie.rb index 115a57e4a1..985cc0d7a1 100644 --- a/test/cgi/test_cgi_cookie.rb +++ b/test/cgi/test_cgi_cookie.rb @@ -101,6 +101,11 @@ class CGICookieTest < Test::Unit::TestCase end end + def test_cgi_cookie_parse_not_decode_name + cookie_str = "%66oo=baz;foo=bar" + cookies = CGI::Cookie.parse(cookie_str) + assert_equal({"%66oo" => ["baz"], "foo" => ["bar"]}, cookies) + end def test_cgi_cookie_arrayinterface cookie = CGI::Cookie.new('name1', 'a', 'b', 'c') -- cgit v1.2.3