summaryrefslogtreecommitdiffstats
path: root/lib/cgi-lib.rb
diff options
context:
space:
mode:
authorwakou <wakou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-05-20 19:56:52 +0000
committerwakou <wakou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-05-20 19:56:52 +0000
commitf0c181ead9b2bc1c437f4be6ea723ba33e559450 (patch)
treecb303b191cf5086938a403ef8135783db49d0d33 /lib/cgi-lib.rb
parentbe3d0202f40c28841aaf3e3cee17d2c1b47c6da2 (diff)
downloadruby-f0c181ead9b2bc1c437f4be6ea723ba33e559450.tar.gz
ruby-f0c181ead9b2bc1c437f4be6ea723ba33e559450.tar.xz
ruby-f0c181ead9b2bc1c437f4be6ea723ba33e559450.zip
Tue May 21 04:48:37 2002 Sean Chittenden <sean@chittenden.org>
* lib/cgi-lib.rb: Checking for constant MOD_RUBY instead of environment variable. Remove a mod_ruby warning and use Apache::request.headers_out[] instead. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/cgi-lib.rb')
-rw-r--r--lib/cgi-lib.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/cgi-lib.rb b/lib/cgi-lib.rb
index ffe3fcf36..ab4eef106 100644
--- a/lib/cgi-lib.rb
+++ b/lib/cgi-lib.rb
@@ -216,10 +216,10 @@ class CGI < SimpleDelegator
# make HTTP header string
def CGI::header(*options)
- if ENV['MOD_RUBY']
+ if defined?(MOD_RUBY)
options.each{|option|
option.sub(/(.*?): (.*)/){
- Apache::request[$1] = $2
+ Apache::request.headers_out[$1] = $2
}
}
Apache::request.send_http_header