diff options
author | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-10-12 12:26:39 +0000 |
---|---|---|
committer | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-10-12 12:26:39 +0000 |
commit | c87d203c207bfa3cf334bc10a20590b386b718c4 (patch) | |
tree | 4f7dbe52268e115e7eb879aac99c8b51ab769b90 /lib/webrick/config.rb | |
parent | bcf484c8b1c96f39d87c0fb9ea120d5d444e69cb (diff) | |
download | ruby-c87d203c207bfa3cf334bc10a20590b386b718c4.tar.gz ruby-c87d203c207bfa3cf334bc10a20590b386b718c4.tar.xz ruby-c87d203c207bfa3cf334bc10a20590b386b718c4.zip |
* lib/webrick/config.rb:
add 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: http://svn.ruby-lang.org/repos/ruby/trunk@7033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/webrick/config.rb')
-rw-r--r-- | lib/webrick/config.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/webrick/config.rb b/lib/webrick/config.rb index 9d2365e40..7a8fc7df0 100644 --- a/lib/webrick/config.rb +++ b/lib/webrick/config.rb @@ -72,6 +72,7 @@ module WEBrick :DirectoryCallback => nil, :FileCallback => nil, :UserDir => "public_html", + :AcceptableLanguages => [] # ["en", "ja", ... ] } BasicAuth = { |