From 58cf2e57e7f51bce543f5f9530c7c700f5408700 Mon Sep 17 00:00:00 2001 From: wakou Date: Mon, 20 May 2002 19:56:52 +0000 Subject: [PATCH] Tue May 21 04:48:37 2002 Sean Chittenden * 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: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ lib/cgi-lib.rb | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index fd2a80bd9a..de67a1fd80 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Tue May 21 04:48:37 2002 Sean Chittenden + + * 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. + Mon May 20 13:28:52 2002 Nobuyoshi Nakada * io.c (rb_io_clone): writing stream was not copied properly. diff --git a/lib/cgi-lib.rb b/lib/cgi-lib.rb index ffe3fcf367..ab4eef1068 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