mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/webrick/httpservlet/cgihandler.rb: conform to mswin32.
[ruby-talk:82735], [ruby-talk:82748], [ruby-talk:82818] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f7294937f6
commit
9cdd5fcb62
2 changed files with 9 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
Wed Sep 24 02:08:11 2003 GOTOU Yuuzou <gotoyuzo@notwork.org>
|
||||
|
||||
* lib/webrick/httpservlet/cgihandler.rb: conform to mswin32.
|
||||
[ruby-talk:82735], [ruby-talk:82748], [ruby-talk:82818]
|
||||
|
||||
Mon Sep 23 23:10:16 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
|
||||
|
||||
* lib/logger.rb: add Logger#<<(msg) for writing msg without any
|
||||
|
|
|
@ -19,7 +19,8 @@ module WEBrick
|
|||
class CGIHandler < AbstractServlet
|
||||
Ruby = File::join(::Config::CONFIG['bindir'],
|
||||
::Config::CONFIG['ruby_install_name'])
|
||||
CGIRunner = "#{Ruby} #{Config::LIBDIR}/httpservlet/cgi_runner.rb"
|
||||
Ruby << ::Config::CONFIG['EXEEXT']
|
||||
CGIRunner = "\"#{Ruby}\" \"#{Config::LIBDIR}/httpservlet/cgi_runner.rb\""
|
||||
|
||||
def initialize(server, name)
|
||||
super
|
||||
|
@ -32,7 +33,7 @@ module WEBrick
|
|||
data = nil
|
||||
status = -1
|
||||
|
||||
cgi_in = IO::popen(@cgicmd, "w")
|
||||
cgi_in = IO::popen(@cgicmd, "wb")
|
||||
cgi_out = Tempfile.new("webrick.cgiout.", @tempdir)
|
||||
cgi_err = Tempfile.new("webrick.cgierr.", @tempdir)
|
||||
begin
|
||||
|
@ -55,6 +56,7 @@ module WEBrick
|
|||
ensure
|
||||
cgi_in.close
|
||||
status = $? >> 8
|
||||
sleep 0.1 if /mswin/ =~ RUBY_PLATFORM
|
||||
data = cgi_out.read
|
||||
cgi_out.close(true)
|
||||
if errmsg = cgi_err.read
|
||||
|
|
Loading…
Reference in a new issue