Flowdock
method

fallback_to_html_format_if_invalid_mime_type

Importance_0
v7.0.0 - Show latest stable - 0 notes - Class: ActionDispatch::ShowExceptions
fallback_to_html_format_if_invalid_mime_type(request) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionpack/lib/action_dispatch/middleware/show_exceptions.rb, line 58
      def fallback_to_html_format_if_invalid_mime_type(request)
        # If the MIME type for the request is invalid then the
        # @exceptions_app may not be able to handle it. To make it
        # easier to handle, we switch to HTML.
        request.formats
      rescue ActionDispatch::Http::MimeNegotiation::InvalidType
        request.set_header "HTTP_ACCEPT", "text/html"
      end
Register or log in to add new notes.