Feature #1103 ยป fix_webrick.patch
lib/webrick/httpservlet/cgihandler.rb (working copy) | ||
---|---|---|
Ruby = File::join(RbConfig::CONFIG['bindir'],
|
||
RbConfig::CONFIG['ruby_install_name'])
|
||
Ruby << RbConfig::CONFIG['EXEEXT']
|
||
CGIRunner = "\"#{Ruby}\" \"#{WEBrick::Config::LIBDIR}/httpservlet/cgi_runner.rb\""
|
||
CGIRunnerExec = "\"#{WEBrick::Config::LIBDIR}/httpservlet/cgi_runner.rb\""
|
||
CGIRunner = "\"#{Ruby}\" #{CGIRunnerExec}"
|
||
def initialize(server, name)
|
||
super(server, name)
|
||
@script_filename = name
|
||
@tempdir = server[:TempDir]
|
||
@cgicmd = "#{CGIRunner} #{server[:CGIInterpreter]}"
|
||
cmd = server[:CGIRuby] ? "#{server[:CGIRuby]} #{CGIRunnerExec}" : CGIRunner
|
||
@cgicmd = "#{cmd} #{server[:CGIInterpreter]}"
|
||
end
|
||
def do_GET(req, res)
|
test/webrick/test_cgi.rb (working copy) | ||
---|---|---|
def start_cgi_server(&block)
|
||
config = {
|
||
:CGIInterpreter => TestWEBrick::RubyBin,
|
||
:CGIRuby => TestWEBrick::RubyBin,
|
||
:DocumentRoot => File.dirname(__FILE__),
|
||
:DirectoryIndex => ["webrick.cgi"],
|
||
:RequestHandler => Proc.new{|req, res|
|
test/webrick/test_filehandler.rb (working copy) | ||
---|---|---|
def test_script_disclosure
|
||
config = {
|
||
:CGIInterpreter => TestWEBrick::RubyBin,
|
||
:CGIRuby => TestWEBrick::RubyBin,
|
||
:DocumentRoot => File.dirname(__FILE__),
|
||
:CGIPathEnv => ENV['PATH'],
|
||
}
|