summaryrefslogtreecommitdiff
path: root/lib/cgi-lib.rb
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-24 14:42:38 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-24 14:42:38 +0000
commit36dbbb1b6a4a254feadf8cbbd30a02bda5c2b2d8 (patch)
treed653a0138e5869bddfeb3ee906b2b83cb03fad60 /lib/cgi-lib.rb
parent96737482af95074829afd897a987bee4f72337d5 (diff)
* lib/cgi.rb (Cookie::parse), lib/cgi-lib.rb (initialize): Do not
pass to split() a bare string longer than 2 characters as separator. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/cgi-lib.rb')
-rw-r--r--lib/cgi-lib.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/cgi-lib.rb b/lib/cgi-lib.rb
index ab4eef1..bc780ff 100644
--- a/lib/cgi-lib.rb
+++ b/lib/cgi-lib.rb
@@ -181,7 +181,7 @@ class CGI < SimpleDelegator
super(@inputs)
if ENV.has_key?('HTTP_COOKIE') or ENV.has_key?('COOKIE')
- (ENV['HTTP_COOKIE'] or ENV['COOKIE']).split("; ").each do |x|
+ (ENV['HTTP_COOKIE'] or ENV['COOKIE']).split(/; /).each do |x|
key, val = x.split(/=/,2)
key = CGI::unescape(key)
val = val.split(/&/).collect{|x|CGI::unescape(x)}.join("\0")