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:
parent
170c40a5cf
commit
b1e29f011d
7 changed files with 19 additions and 6 deletions
12
ChangeLog
12
ChangeLog
|
@ -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>
|
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]
|
* test/ruby/test_super.rb: added optional arg tests. [ruby-dev:26743]
|
||||||
|
|
|
@ -24,8 +24,8 @@ module WEBrick
|
||||||
end
|
end
|
||||||
|
|
||||||
class HTTPProxyServer < HTTPServer
|
class HTTPProxyServer < HTTPServer
|
||||||
def initialize(config)
|
def initialize(config={}, default=Config::HTTP)
|
||||||
super
|
super(config, default)
|
||||||
c = @config
|
c = @config
|
||||||
@via = "#{c[:HTTPVersion]} #{c[:ServerName]}:#{c[:Port]}"
|
@via = "#{c[:HTTPVersion]} #{c[:ServerName]}:#{c[:Port]}"
|
||||||
end
|
end
|
||||||
|
|
|
@ -21,7 +21,7 @@ module WEBrick
|
||||||
|
|
||||||
class HTTPServer < ::WEBrick::GenericServer
|
class HTTPServer < ::WEBrick::GenericServer
|
||||||
def initialize(config={}, default=Config::HTTP)
|
def initialize(config={}, default=Config::HTTP)
|
||||||
super
|
super(config, default)
|
||||||
@http_version = HTTPVersion::convert(@config[:HTTPVersion])
|
@http_version = HTTPVersion::convert(@config[:HTTPVersion])
|
||||||
|
|
||||||
@mount_tab = MountTable.new
|
@mount_tab = MountTable.new
|
||||||
|
|
|
@ -23,7 +23,7 @@ module WEBrick
|
||||||
CGIRunner = "\"#{Ruby}\" \"#{Config::LIBDIR}/httpservlet/cgi_runner.rb\""
|
CGIRunner = "\"#{Ruby}\" \"#{Config::LIBDIR}/httpservlet/cgi_runner.rb\""
|
||||||
|
|
||||||
def initialize(server, name)
|
def initialize(server, name)
|
||||||
super
|
super(server, name)
|
||||||
@script_filename = name
|
@script_filename = name
|
||||||
@tempdir = server[:TempDir]
|
@tempdir = server[:TempDir]
|
||||||
@cgicmd = "#{CGIRunner} #{server[:CGIInterpreter]}"
|
@cgicmd = "#{CGIRunner} #{server[:CGIInterpreter]}"
|
||||||
|
|
|
@ -17,7 +17,7 @@ module WEBrick
|
||||||
|
|
||||||
class ERBHandler < AbstractServlet
|
class ERBHandler < AbstractServlet
|
||||||
def initialize(server, name)
|
def initialize(server, name)
|
||||||
super
|
super(server, name)
|
||||||
@script_filename = name
|
@script_filename = name
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ module WEBrick
|
||||||
|
|
||||||
class DefaultFileHandler < AbstractServlet
|
class DefaultFileHandler < AbstractServlet
|
||||||
def initialize(server, local_path)
|
def initialize(server, local_path)
|
||||||
super
|
super(server, local_path)
|
||||||
@local_path = local_path
|
@local_path = local_path
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -90,6 +90,7 @@ module WEBrick
|
||||||
"tiff" => "image/tiff",
|
"tiff" => "image/tiff",
|
||||||
"txt" => "text/plain",
|
"txt" => "text/plain",
|
||||||
"xbm" => "image/x-xbitmap",
|
"xbm" => "image/x-xbitmap",
|
||||||
|
"xhtml" => "text/html",
|
||||||
"xls" => "application/vnd.ms-excel",
|
"xls" => "application/vnd.ms-excel",
|
||||||
"xml" => "text/xml",
|
"xml" => "text/xml",
|
||||||
"xpm" => "image/x-xpixmap",
|
"xpm" => "image/x-xpixmap",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue