Can anyone explain the purpose of CGI_PARAMS in `cgi.rb’; why the
constants get defined at all? I cannot find anything that refers to
them.
They conflict with a reusable environment (i.e. FastCGI).
cgi.rb:
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
eval "CGI_PARAMS = @params.nil? ? nil : @params.dup"
eval "CGI_COOKIES = @cookies.nil? ? nil : @cookies.dup"
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)
self.class.class_eval("remove_const(:CGI_PARAMS)")
self.class.class_eval("remove_const(:CGI_COOKIES)")
end
end
end
end
···
–
Dan Janowski
danj@3skel.com
don’t know how to answer your question, but here’s how i got around it :
http://groups.google.com/groups?q=ahoward+mod_fcgi+group:comp.lang.ruby&hl=en&lr=&ie=UTF-8&selm=Pine.LNX.4.33.0302121430040.10747-100000%40eli.fsl.noaa.gov&rnum=1
-a
···
On Tue, 4 Mar 2003, Dan Janowski wrote:
Can anyone explain the purpose of CGI_PARAMS in `cgi.rb’; why the
constants get defined at all? I cannot find anything that refers to
them.
They conflict with a reusable environment (i.e. FastCGI).
cgi.rb:
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
eval "CGI_PARAMS = @params.nil? ? nil : @params.dup"
eval "CGI_COOKIES = @cookies.nil? ? nil : @cookies.dup"
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)
self.class.class_eval("remove_const(:CGI_PARAMS)")
self.class.class_eval("remove_const(:CGI_COOKIES)")
end
end
end
end
–
Ara Howard
NOAA Forecast Systems Laboratory
Information and Technology Services
Data Systems Group
R/FST 325 Broadway
Boulder, CO 80305-3328
Email: ahoward@fsl.noaa.gov
Phone: 303-497-7238
Fax: 303-497-7259
====================================