Skip to content

Commit

Permalink
log 404 error of unmounted path, fixes #1459
Browse files Browse the repository at this point in the history
  • Loading branch information
ujifgc committed Oct 17, 2013
1 parent 2005508 commit 4ed0d63
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions padrino-core/lib/padrino-core/router.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand All @@ -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

Expand Down

0 comments on commit 4ed0d63

Please sign in to comment.