mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/cgi.rb (CGI::initialize): remove at_exit code for CGI_PARAMS
and CGI_COOKIES. they will no longer be used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
51c61416d7
commit
3a43b8429f
2 changed files with 12 additions and 28 deletions
|
@ -1,3 +1,8 @@
|
|||
Wed Jul 28 18:59:17 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* lib/cgi.rb (CGI::initialize): remove at_exit code for CGI_PARAMS
|
||||
and CGI_COOKIES. they will no longer be used.
|
||||
|
||||
Wed Jul 28 15:44:08 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* eval.c (rb_call0): should call rb_call_super() directly for
|
||||
|
|
35
lib/cgi.rb
35
lib/cgi.rb
|
@ -2256,36 +2256,15 @@ class CGI
|
|||
Apache.request.setup_cgi_env
|
||||
end
|
||||
|
||||
(class << self; self; end).class_eval do
|
||||
const_set(:CGI_PARAMS, [1])
|
||||
const_set(:CGI_COOKIES, [2])
|
||||
end
|
||||
|
||||
extend QueryExtension
|
||||
@multipart = false
|
||||
if "POST" != env_table['REQUEST_METHOD']
|
||||
initialize_query() # set @params, @cookies
|
||||
else
|
||||
if defined?(CGI_PARAMS)
|
||||
@params = CGI_PARAMS.nil? ? nil : CGI_PARAMS.dup
|
||||
@cookies = CGI_COOKIES.nil? ? nil : CGI_COOKIES.dup
|
||||
else
|
||||
initialize_query() # set @params, @cookies
|
||||
params = @params.nil? ? nil : @params.dup
|
||||
cookies = @cookies.nil? ? nil : @cookies.dup
|
||||
(class << self; self; end).class_eval do
|
||||
const_set(:CGI_PARAMS, params)
|
||||
const_set(:CGI_COOKIES, cookies)
|
||||
end
|
||||
if defined?(MOD_RUBY) and (RUBY_VERSION < "1.4.3")
|
||||
raise "Please, use ruby1.4.3 or later."
|
||||
else
|
||||
at_exit() do
|
||||
if defined?(CGI_PARAMS)
|
||||
CGI.class_eval do
|
||||
remove_const(:CGI_PARAMS)
|
||||
remove_const(:CGI_COOKIES)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
initialize_query() # set @params, @cookies
|
||||
@output_cookies = nil
|
||||
@output_hidden = nil
|
||||
|
||||
|
|
Loading…
Reference in a new issue