From 0f31b3f465036884fc0e22ddb4fe5d46279eccae Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Mon, 29 Jun 2020 10:29:25 +0900 Subject: [ruby/cgi] When parsing cookies, only decode the values https://github.com/ruby/cgi/commit/052eb3a828 --- 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