From 21eeaefd17684d2cd851c373507b6a5f7d95ba08 Mon Sep 17 00:00:00 2001 From: gotoyuzo Date: Sun, 7 Mar 2004 16:06:43 +0000 Subject: * lib/webrick/config.rb (WEBrick::Config::HTTP): rename :RequestHander to :RequestCallback and add new option :ServerAlias. * lib/webrick/httpserver.rb (WEBrick::HTTPServer#run): use :RequestCallback and warn if :RequestHandler is in server's option. * lib/webrick/httpserver.rb (WEBrick::HTTPServer#run): should print error message for WEBrick::HTTPSataus::Error. * lib/webrick/httpserver.rb (WEBrick::HTTPServer#lookup_server): lookup for hostname from :ServerAlias if the req.host is not match to :ServerName. * lib/webrick/httpservlet.rb (WEBrick::HTTPServlet::CGIHandler#do_GET): use $?.exitstatus and refine log message. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/webrick/httpservlet/cgihandler.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/webrick/httpservlet') diff --git a/lib/webrick/httpservlet/cgihandler.rb b/lib/webrick/httpservlet/cgihandler.rb index aa92bb4a2..36f5e44ea 100644 --- a/lib/webrick/httpservlet/cgihandler.rb +++ b/lib/webrick/httpservlet/cgihandler.rb @@ -55,7 +55,7 @@ module WEBrick end ensure cgi_in.close - status = $? >> 8 + status = $?.exitstatus sleep 0.1 if /mswin/ =~ RUBY_PLATFORM data = cgi_out.read cgi_out.close(true) @@ -74,7 +74,7 @@ module WEBrick data = "" unless data raw_header, body = data.split(/^[\xd\xa]+/on, 2) raise HTTPStatus::InternalServerError, - "The server encontered a script error." if body.nil? + "Premature end of script headers: #{@script_filename}" if body.nil? begin header = HTTPUtils::parse_header(raw_header) -- cgit