diff options
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | lib/webrick/httpproxy.rb | 4 | ||||
-rw-r--r-- | lib/webrick/httpserver.rb | 2 | ||||
-rw-r--r-- | lib/webrick/httpservlet/cgihandler.rb | 2 | ||||
-rw-r--r-- | lib/webrick/httpservlet/erbhandler.rb | 2 | ||||
-rw-r--r-- | lib/webrick/httpservlet/filehandler.rb | 2 | ||||
-rw-r--r-- | lib/webrick/httputils.rb | 1 |
7 files changed, 19 insertions, 6 deletions
@@ -1,3 +1,15 @@ +Mon Aug 8 05:15:19 2005 GOTOU Yuuzou <[email protected]> + + * lib/webrick/httpproxy.rb (HTTPProxyServer#intialize), + lib/webrick/httpserver.rb (HTTPServer#intialize), + lib/webrick/httpservlet/cgihandler.rb (CGIHandler#initialize), + lib/webrick/httpservlet/erbhandler.rb (ERBHandler#initialize), + lib/webrick/httpservlet/filehandler.rb(DefaultFileHandler#initialize): + super (called with no arguments) takes default value of optional + arguments. [ruby-dev:26743] + + * lib/webrick/httputils.rb: add a media-type "text/html" for .xhtml. + Sun Aug 7 23:52:39 2005 NAKAMURA, Hiroshi <[email protected]> * test/ruby/test_super.rb: added optional arg tests. [ruby-dev:26743] diff --git a/lib/webrick/httpproxy.rb b/lib/webrick/httpproxy.rb index 14e3499775..8864620e12 100644 --- a/lib/webrick/httpproxy.rb +++ b/lib/webrick/httpproxy.rb @@ -24,8 +24,8 @@ module WEBrick end class HTTPProxyServer < HTTPServer - def initialize(config) - super + def initialize(config={}, default=Config::HTTP) + super(config, default) c = @config @via = "#{c[:HTTPVersion]} #{c[:ServerName]}:#{c[:Port]}" end diff --git a/lib/webrick/httpserver.rb b/lib/webrick/httpserver.rb index bce94746c2..9441d84661 100644 --- a/lib/webrick/httpserver.rb +++ b/lib/webrick/httpserver.rb @@ -21,7 +21,7 @@ module WEBrick class HTTPServer < ::WEBrick::GenericServer def initialize(config={}, default=Config::HTTP) - super + super(config, default) @http_version = HTTPVersion::convert(@config[:HTTPVersion]) @mount_tab = MountTable.new diff --git a/lib/webrick/httpservlet/cgihandler.rb b/lib/webrick/httpservlet/cgihandler.rb index 7dd330ba7b..9a300cf72b 100644 --- a/lib/webrick/httpservlet/cgihandler.rb +++ b/lib/webrick/httpservlet/cgihandler.rb @@ -23,7 +23,7 @@ module WEBrick CGIRunner = "\"#{Ruby}\" \"#{Config::LIBDIR}/httpservlet/cgi_runner.rb\"" def initialize(server, name) - super + super(server, name) @script_filename = name @tempdir = server[:TempDir] @cgicmd = "#{CGIRunner} #{server[:CGIInterpreter]}" diff --git a/lib/webrick/httpservlet/erbhandler.rb b/lib/webrick/httpservlet/erbhandler.rb index b9d5e65b65..49792193ba 100644 --- a/lib/webrick/httpservlet/erbhandler.rb +++ b/lib/webrick/httpservlet/erbhandler.rb @@ -17,7 +17,7 @@ module WEBrick class ERBHandler < AbstractServlet def initialize(server, name) - super + super(server, name) @script_filename = name end diff --git a/lib/webrick/httpservlet/filehandler.rb b/lib/webrick/httpservlet/filehandler.rb index ba9417f3e8..918393dbd4 100644 --- a/lib/webrick/httpservlet/filehandler.rb +++ b/lib/webrick/httpservlet/filehandler.rb @@ -20,7 +20,7 @@ module WEBrick class DefaultFileHandler < AbstractServlet def initialize(server, local_path) - super + super(server, local_path) @local_path = local_path end diff --git a/lib/webrick/httputils.rb b/lib/webrick/httputils.rb index 2a65552f20..e660f04405 100644 --- a/lib/webrick/httputils.rb +++ b/lib/webrick/httputils.rb @@ -90,6 +90,7 @@ module WEBrick "tiff" => "image/tiff", "txt" => "text/plain", "xbm" => "image/x-xbitmap", + "xhtml" => "text/html", "xls" => "application/vnd.ms-excel", "xml" => "text/xml", "xpm" => "image/x-xpixmap", |