From 4c9362b74fe837475fe0ab647ba48eee07d69f9f Mon Sep 17 00:00:00 2001 From: wakou Date: Tue, 30 Oct 2001 17:48:24 +0000 Subject: * lib/cgi.rb: CGI::Cookie::parse(): Ignore duplicate keys caused by Netscape bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/cgi.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/cgi.rb') diff --git a/lib/cgi.rb b/lib/cgi.rb index 7148e7ab03..97bbc994f0 100644 --- a/lib/cgi.rb +++ b/lib/cgi.rb @@ -698,9 +698,7 @@ convert string charset, and set language to "ja". name = CGI::unescape(name) values ||= "" values = values.split('&').collect{|v| CGI::unescape(v) } - if cookies.has_key?(name) - cookies[name].value.push(*values) - else + unless cookies.has_key?(name) cookies[name] = Cookie::new({ "name" => name, "value" => values }) end end -- cgit v1.2.3