diff options
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/http/mime_types.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/debug_exceptions.rb | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/actionpack/lib/action_dispatch/http/mime_types.rb b/actionpack/lib/action_dispatch/http/mime_types.rb index 95881acac3..66cea88256 100644 --- a/actionpack/lib/action_dispatch/http/mime_types.rb +++ b/actionpack/lib/action_dispatch/http/mime_types.rb @@ -28,7 +28,7 @@ Mime::Type.register "application/x-www-form-urlencoded", :url_encoded_form # http://www.ietf.org/rfc/rfc4627.txt # http://www.json.org/JSONRequest.html -Mime::Type.register "application/json", :json, %w( text/x-json application/jsonrequest application/vnd.api+json ) +Mime::Type.register "application/json", :json, %w( text/x-json application/jsonrequest ) Mime::Type.register "application/pdf", :pdf, [], %w(pdf) Mime::Type.register "application/zip", :zip, [], %w(zip) diff --git a/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb b/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb index daaaed8df5..51a471fb23 100644 --- a/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb +++ b/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb @@ -149,6 +149,7 @@ module ActionDispatch def log_error(request, wrapper) logger = logger(request) return unless logger + exception = wrapper.exception trace = wrapper.application_trace @@ -163,11 +164,11 @@ module ActionDispatch end end - def log_array logger, array - array.map { |line| logger.fatal line} + def log_array(logger, array) + array.map { |line| logger.fatal line } end - def logger request + def logger(request) request.logger || ActionView::Base.logger || stderr_logger end |