diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-09-16 03:09:51 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-09-16 03:09:51 +0000 |
commit | 63cfc6ddb759c4c614f9fccaca11a47b8f091b70 (patch) | |
tree | 857ab2102956ce268a9a63216c11e4bc14a88821 /lib | |
parent | 3479ec2eed71bfad489b50e247e4190e0db691fc (diff) | |
download | ruby-63cfc6ddb759c4c614f9fccaca11a47b8f091b70.tar.gz ruby-63cfc6ddb759c4c614f9fccaca11a47b8f091b70.tar.xz ruby-63cfc6ddb759c4c614f9fccaca11a47b8f091b70.zip |
* ext/syck/rubyext.c (syck_resolver_transfer): remove C++ style
comment (//). [ruby-core:05793]
* lib/net/telnet.rb (Net::Telnet::waitfor): replace sysread with
readpartial. [ruby-talk:127641]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/cgi.rb | 8 | ||||
-rw-r--r-- | lib/net/telnet.rb | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/lib/cgi.rb b/lib/cgi.rb index bcc3dd900..fc16ead67 100644 --- a/lib/cgi.rb +++ b/lib/cgi.rb @@ -880,15 +880,17 @@ class CGI cookies = Hash.new([]) return cookies unless raw_cookie - raw_cookie.split(/; /).each do |pairs| + raw_cookie.split(/[;,] /).each do |pairs| name, values = pairs.split('=',2) next unless name and values + p [name, values] name = CGI::unescape(name) values ||= "" values = values.split('&').collect{|v| CGI::unescape(v) } - unless cookies.has_key?(name) - cookies[name] = Cookie::new({ "name" => name, "value" => values }) + if cookies.has_key?(name) + values = cookies[name].value + values end + cookies[name] = Cookie::new({ "name" => name, "value" => values }) end cookies diff --git a/lib/net/telnet.rb b/lib/net/telnet.rb index 1ac5f25f0..16459d7c6 100644 --- a/lib/net/telnet.rb +++ b/lib/net/telnet.rb @@ -554,7 +554,7 @@ module Net raise TimeoutError, "timed out while waiting for more data" end begin - c = @sock.sysread(1024 * 1024) + c = @sock.readpartial(1024 * 1024) @dumplog.log_dump('<', c) if @options.has_key?("Dump_log") if @options["Telnetmode"] c = rest + c |