<p><b>@mmd-osm</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2485#discussion_r369630461">app/controllers/api_controller.rb</a>:</p>
<pre style='color:#555'>> @@ -3,6 +3,52 @@ class ApiController < ApplicationController
 
   private
 
+  ##
+  # Set default request format to xml unless a client requests a specific format,
+  # which can be done via (a) URL suffix and/or (b) HTTP Accept header, where
+  # the URL suffix always takes precedence over the Accept header.
+  def set_default_request_format
</pre>
<p>Wait, I really wanted to add a test case with "<code>http_accept_format("image/jpeg")</code>", which behaves in the way like text/json (which is not a valid format). Will to that. The expected outcome would still be HTTP 500 (instead of HTTP 406), and not returning XML.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2485?email_source=notifications&email_token=AAK2OLPAFI472GWIZGARWWTQ7BRG5A5CNFSM4KAKS5KKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCSU6QOI#discussion_r369630461">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLKPI6UIMEXB7MRVXGLQ7BRG5ANCNFSM4KAKS5KA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAK2OLNTSO7MMXC53RLUAMLQ7BRG5A5CNFSM4KAKS5KKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCSU6QOI.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/2485?email_source=notifications\u0026email_token=AAK2OLPAFI472GWIZGARWWTQ7BRG5A5CNFSM4KAKS5KKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCSU6QOI#discussion_r369630461",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/2485?email_source=notifications\u0026email_token=AAK2OLPAFI472GWIZGARWWTQ7BRG5A5CNFSM4KAKS5KKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCSU6QOI#discussion_r369630461",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>