summaryrefslogtreecommitdiffstats
path: root/lib
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
commit09cc6c6947289d4bcdaba7d82c6151956f245747 (patch)
treebebe5da9b61257d92288169e926db5360ff2ca88 /lib
parenta3e023dfdb1fa68f380b78d10bf53d72bed4818c (diff)
downloadruby-09cc6c6947289d4bcdaba7d82c6151956f245747.tar.gz
ruby-09cc6c6947289d4bcdaba7d82c6151956f245747.tar.xz
ruby-09cc6c6947289d4bcdaba7d82c6151956f245747.zip
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@6675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/webrick/httpservlet/cgihandler.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/webrick/httpservlet/cgihandler.rb b/lib/webrick/httpservlet/cgihandler.rb
index 36f5e44ea..7dd330ba7 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