X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/92ca4069957666065194e0b63de5b46261b8a21d..24f6aeda6a1b657d68a4e66f3a34d14ef408d652:/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