summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-07-18 15:59:02 +0000
committergotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-07-18 15:59:02 +0000
commit433920226600a38b8d2287a5c78aa711bd9acd1b (patch)
treebebe5da9b61257d92288169e926db5360ff2ca88
parentf4991ab79520659d2a4ca585c41fa22141e3f6d8 (diff)
* lib/webrick/httpservlet/cgihandler.rb
(WEBrick::HTTPServlet::CGIhandler#do_GET): set SystemRoot environment variable to CGI process on Windows native platforms. [ruby-dev:23936] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--lib/webrick/httpservlet/cgihandler.rb5
2 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 2321e0adeb..f22e3c69b0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Mon Jul 19 00:53:46 2004 GOTOU Yuuzou <gotoyuzo@notwork.org>
+
+ * lib/webrick/httpservlet/cgihandler.rb
+ (WEBrick::HTTPServlet::CGIhandler#do_GET): set SystemRoot environment
+ variable to CGI process on Windows native platforms. [ruby-dev:23936]
+
Sun Jul 18 16:14:29 2004 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tk/lib/tk/msgcat.rb (TkMsgCatalog.callback): bug fix
diff --git a/lib/webrick/httpservlet/cgihandler.rb b/lib/webrick/httpservlet/cgihandler.rb
index 36f5e44ead..7dd330ba7b 100644
--- a/lib/webrick/httpservlet/cgihandler.rb
+++ b/lib/webrick/httpservlet/cgihandler.rb
@@ -41,6 +41,9 @@ module WEBrick
meta = req.meta_vars
meta["SCRIPT_FILENAME"] = @script_filename
meta["PATH"] = @config[:CGIPathEnv]
+ if /mswin|bccwin|mingw/ =~ RUBY_PLATFORM
+ meta["SystemRoot"] = ENV["SystemRoot"]
+ end
dump = Marshal.dump(meta)
cgi_in.write("%8d" % cgi_out.path.size)
@@ -56,7 +59,7 @@ module WEBrick
ensure
cgi_in.close
status = $?.exitstatus
- sleep 0.1 if /mswin/ =~ RUBY_PLATFORM
+ sleep 0.1 if /mswin|bccwin|mingw/ =~ RUBY_PLATFORM
data = cgi_out.read
cgi_out.close(true)
if errmsg = cgi_err.read