X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/e89742928ddccbe127955f94be4be61e13f1faed..a67ff9c0389702e169e44103d02d89886878a51d:/app/controllers/api_controller.rb 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