summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--lib/cgi-lib.rb4
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 48e5a05..056dfdc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
Tue May 21 01:16:46 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* parse.y (bodystmt): ensure clause was excuted on else clause
diff --git a/lib/cgi-lib.rb b/lib/cgi-lib.rb
index ffe3fcf..ab4eef1 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