X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/92ca4069957666065194e0b63de5b46261b8a21d..865d20af80a70929c761e3ea6d1010669bb4ed62:/app/controllers/api_controller.rb?ds=sidebyside diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb index 478810dfc..c905b24ce 100644 --- a/app/controllers/api_controller.rb +++ b/app/controllers/api_controller.rb @@ -22,10 +22,10 @@ class ApiController < ApplicationController # # As a workaround, and for back compatibility, default to XML format. mimetypes = begin - Mime::Type.parse(accept_header) - rescue Mime::Type::InvalidMimeType - Array(Mime[:xml]) - end + Mime::Type.parse(accept_header) + rescue Mime::Type::InvalidMimeType + Array(Mime[:xml]) + end # Allow XML and JSON formats, and treat an all formats wildcard # as XML for backwards compatibility - all other formats are discarded