diff options
author | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-10-17 17:13:04 +0000 |
---|---|---|
committer | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-10-17 17:13:04 +0000 |
commit | a79c87e3330a2aa589470133bf87a3e8a06d56c5 (patch) | |
tree | 8ecba18c40fb4b81464c7c7f9171b8592b4efb17 /lib/webrick/config.rb | |
parent | f93f318f77033b97992475bf7d741245ec4ffa2d (diff) |
* lib/webrick/config.rb (WEBrick::Config::General): add default values:
- WEBrick::Config[:DoNotReverseLookup]
- WEBrick::Config[:RequestCallback] (it used as an alias of
:RequestHandler in WEBrick::HTTPServer#run)
- WEBrick::Config::FileHandler[:AcceptableLanguages]
* lib/webrick/httpservlet/filehandler.rb
(WEBrick::HTTPServlet::FileHandler#set_filename): search files
having suffix of language-name which Accept-Language header field
includes if :AcceptableLanguages options is present.
* lib/webrick/httpservlet/filehandler.rb
(WEBrick::HTTPServlet::FileHandler#get_servlet): new method to
search servlet correspond to the suffix of filename.
* lib/webrick/httprequest.rb: add attributes access methods: accept,
accept_charset, accept_encoding, accept_language, content_length
and content_type.
* lib/webrick/httpresponse.rb: add attribute access methods:
content_length, content_length=, content_type and content_type=.
* lib/webrick/httputils.rb (WEBrick::HTTPUtils.mime_types):
use the second suffix to detect media type. (the first suffix
may be a language name.)
* lib/webrick/httputils.rb (WEBrick::HTTPUtils.parse_qvalues):
add method to parse Accept header field. it returns an Array of
values sorted by the qvalues.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/webrick/config.rb')
-rw-r--r-- | lib/webrick/config.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/webrick/config.rb b/lib/webrick/config.rb index 31c0053363..f0e262bf3e 100644 --- a/lib/webrick/config.rb +++ b/lib/webrick/config.rb @@ -33,6 +33,7 @@ module WEBrick :StartCallback => nil, :StopCallback => nil, :AcceptCallback => nil, + :DoNotReverseLookup => nil, } # for HTTPServer, HTTPRequest, HTTPResponse ... @@ -45,14 +46,15 @@ module WEBrick :DirectoryIndex => ["index.html","index.htm","index.cgi","index.rhtml"], :DocumentRoot => nil, :DocumentRootOptions => { :FancyIndexing => true }, - :RequestHandler => nil, + :RequestCallback => nil, # alias of :RequestHandler + :ServerAlias => nil, + + # for HTTPProxyServer :ProxyAuthProc => nil, :ProxyContentHandler => nil, :ProxyVia => true, :ProxyTimeout => true, - - # upstream proxy server :ProxyURI => nil, :CGIInterpreter => nil, @@ -71,6 +73,7 @@ module WEBrick :DirectoryCallback => nil, :FileCallback => nil, :UserDir => "public_html", + :AcceptableLanguages => [] # ["en", "ja", ... ] } BasicAuth = { |