mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
2000-03-06
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b014cc337e
commit
d7b8e448bf
18 changed files with 127 additions and 67 deletions
|
@ -648,10 +648,12 @@ convert string charset, and set language to "ja".
|
|||
=end
|
||||
def Cookie::parse(raw_cookie)
|
||||
cookies = Hash.new([])
|
||||
return cookies unless raw_cookie
|
||||
|
||||
raw_cookie.split('; ').each do |pairs|
|
||||
name, values = pairs.split('=',2)
|
||||
name = CGI::unescape(name)
|
||||
values ||= ""
|
||||
values = values.split('&').filter{|v| CGI::unescape(v) }
|
||||
if cookies.has_key?(name)
|
||||
cookies[name].value.push(*values)
|
||||
|
@ -877,8 +879,7 @@ convert string charset, and set language to "ja".
|
|||
)
|
||||
end
|
||||
|
||||
@cookies = CGI::Cookie::parse((env_table['HTTP_COOKIE'] or
|
||||
env_table['COOKIE'] or ""))
|
||||
@cookies = CGI::Cookie::parse((env_table['HTTP_COOKIE'] or env_table['COOKIE']))
|
||||
|
||||
end
|
||||
private :initialize_query
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue