1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
gotoyuzo 2005-08-07 20:16:15 +00:00
parent 170c40a5cf
commit b1e29f011d
7 changed files with 19 additions and 6 deletions

View file

@ -1,3 +1,15 @@
Mon Aug 8 05:15:19 2005 GOTOU Yuuzou <gotoyuzo@notwork.org>
* 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 <nakahiro@sarion.co.jp>
* test/ruby/test_super.rb: added optional arg tests. [ruby-dev:26743]

View file

@ -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

View file

@ -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

View file

@ -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]}"

View file

@ -17,7 +17,7 @@ module WEBrick
class ERBHandler < AbstractServlet
def initialize(server, name)
super
super(server, name)
@script_filename = name
end

View file

@ -20,7 +20,7 @@ module WEBrick
class DefaultFileHandler < AbstractServlet
def initialize(server, local_path)
super
super(server, local_path)
@local_path = local_path
end

View file

@ -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",