diff options
| author | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-16 09:46:00 +0000 |
|---|---|---|
| committer | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-16 09:46:00 +0000 |
| commit | 0fb0096ffd3e07d9da2bb35954d5d6c9a4e27cce (patch) | |
| tree | a922076933dcd0f14a46358c0a7c39a41ed42f89 /lib/webrick/accesslog.rb | |
| parent | 415bd361ca29a2f227a287df758fad27b6e89b26 (diff) | |
| download | ruby-0fb0096ffd3e07d9da2bb35954d5d6c9a4e27cce.tar.gz ruby-0fb0096ffd3e07d9da2bb35954d5d6c9a4e27cce.tar.xz ruby-0fb0096ffd3e07d9da2bb35954d5d6c9a4e27cce.zip | |
* lib/webrick/httpserver.rb (WEBrick::HTTPServer#run): should wait
for reading request till data arrive. [ruby-talk:121068]
* lib/webrick/server.rb (WEBrick::GenericServer#start_thread):
should log about all accepted socket. [ruby-core:03962]
* lib/webrick/accesslog.rb (WEBrick::AccessLog#setup_params):
"%%" and "%u" are supported. [webricken:135]
* lib/webrick/httpservlet/filehandler.rb
(WEBrick::HTTPServlet::FileHandler#check_filename):
:NondisclosureName is acceptable if it is Enumerable.
* lib/webrick/config.rb (WEBrick::Config::FileHandler):
default value of :NondisclosureName is [".ht*", "*~"].
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/webrick/accesslog.rb')
| -rw-r--r-- | lib/webrick/accesslog.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/webrick/accesslog.rb b/lib/webrick/accesslog.rb index 25dcbc1be..f97769545 100644 --- a/lib/webrick/accesslog.rb +++ b/lib/webrick/accesslog.rb @@ -32,6 +32,7 @@ module WEBrick params["i"] = req params["l"] = "-" params["m"] = req.request_method + params["n"] = req.attributes params["o"] = res params["p"] = req.port params["q"] = req.query_string @@ -46,15 +47,17 @@ module WEBrick end def format(format_string, params) - format_string.gsub(/\%(?:\{(.*?)\})?>?([a-zA-Z])/){ + format_string.gsub(/\%(?:\{(.*?)\})?>?([a-zA-Z%])/){ param, spec = $1, $2 case spec[0] - when ?e, ?i, ?o + when ?e, ?i, ?n, ?o raise AccessLogError, "parameter is required for \"#{spec}\"" unless param params[spec][param] || "-" when ?t params[spec].strftime(param || CLF_TIME_FORMAT) + when ?% + "%" else params[spec] end |
