diff options
author | wakou <wakou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-10-30 17:48:24 +0000 |
---|---|---|
committer | wakou <wakou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-10-30 17:48:24 +0000 |
commit | 28fd3752ea278fc965227fa94faf4d11de9320a1 (patch) | |
tree | 336112a19adfdaa662cefc1c498381724f93c114 | |
parent | c51e711808b1005f3a7d3031db0ba1abd2db25c8 (diff) | |
download | ruby-28fd3752ea278fc965227fa94faf4d11de9320a1.tar.gz ruby-28fd3752ea278fc965227fa94faf4d11de9320a1.tar.xz ruby-28fd3752ea278fc965227fa94faf4d11de9320a1.zip |
* lib/cgi.rb: CGI::Cookie::parse(): Ignore duplicate keys caused by
Netscape bug.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/cgi.rb | 4 |
2 files changed, 6 insertions, 3 deletions
@@ -1,3 +1,8 @@ +Wed Oct 31 02:44:06 2001 Wakou Aoyama <wakou@fsinet.or.jp> + + * lib/cgi.rb: CGI::Cookie::parse(): Ignore duplicate keys caused by + Netscape bug. + Tue Oct 30 18:21:51 2001 Usaku Nakamura <usa@ruby-lang.org> * win32/mkexports.rb: follow the change of rb_io_puts(). diff --git a/lib/cgi.rb b/lib/cgi.rb index 7148e7ab0..97bbc994f 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 |