Permalink
Browse files

log 404 error of unmounted path, fixes #1459

  • Loading branch information...
ujifgc committed Oct 17, 2013
1 parent 2005508 commit 4ed0d632f8def9f3d7d5196e1c7966b44b4ed68f
Showing with 2 additions and 0 deletions.
  1. +2 −0 padrino-core/lib/padrino-core/router.rb
@@ -67,6 +67,7 @@ def map(options={})
# The call handler setup to route a request given the mappings specified.
def call(env)
began_at = Time.now
path_info = env["PATH_INFO"].to_s
script_name = env['SCRIPT_NAME']
http_host = env['HTTP_HOST']
@@ -83,6 +84,7 @@ def call(env)
'SCRIPT_NAME' => (script_name + path),
'PATH_INFO' => rest))
end
Padrino::Logger::Rack.new(nil,'/').send(:log, env, 404, {}, began_at) if logger.debug?
[404, {"Content-Type" => "text/plain", "X-Cascade" => "pass"}, ["Not Found: #{path_info}"]]
end

0 comments on commit 4ed0d63

Please sign in to comment.