mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/cgi/session.rb (CGI::Session::initialize): updated to
support 2003-04-23 change in cgi.rb [ruby-core:1002] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
954ba9bab2
commit
c9356d82bc
2 changed files with 10 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
Fri May 2 17:37:01 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* lib/cgi/session.rb (CGI::Session::initialize): updated to
|
||||
support 2003-04-23 change in cgi.rb [ruby-core:1002]
|
||||
|
||||
Fri May 2 17:21:02 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* class.c (method_list): classify methods based on nearest
|
||||
|
|
|
@ -27,15 +27,17 @@ class CGI
|
|||
|
||||
def initialize(request, option={})
|
||||
session_key = option['session_key'] || '_session_id'
|
||||
id, = option['session_id']
|
||||
id = option['session_id']
|
||||
unless id
|
||||
if option['new_session']
|
||||
id = Session::create_new_id
|
||||
end
|
||||
end
|
||||
unless id
|
||||
id, = request[session_key]
|
||||
id = id.read if id.respond_to?(:read)
|
||||
if request.key?(session_key)
|
||||
id = request[session_key]
|
||||
id = id.read if id.respond_to?(:read)
|
||||
end
|
||||
unless id
|
||||
id, = request.cookies[session_key]
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue