<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_r369677097">app/controllers/api_controller.rb</a>:</p>
<pre style='color:#555'>> + if mime.symbol == :xml
+ request.format = "xml"
+ break
+ end
+
+ if mime.symbol == :json
+ request.format = "json"
+ break
+ end
+
+ # Any format, not explicitly requesting XML or JSON -> assume XML as default
+ if mime == "*/*"
+ request.format = "xml"
+ break
+ end
+ end
</pre>
<p>That's how the future behaviour looks like vs. what we have on osm.org/master.apis:</p>
<p><code>curl -v 'https://master.apis.dev.openstreetmap.org/api/0.6/map?bbox=-61.083984375,45.5371366803986,-61.07849121093749,45.540984218050774' -H "Accept: text/plain</code></p>
<p>Returns: HTTP 406 (also for <a href="http://www.openstreetmap.org" rel="nofollow">www.openstreetmap.org</a>).</p>
<p><code>curl -v 'http://localhost:3000/api/0.6/map?bbox=-61.083984375,45.5371366803986,-61.07849121093749,45.540984218050774' -H "Accept: text/plain"</code></p>
<p>500 Internal Server Error - ActionController::UnknownFormat: ActionController::UnknownFormat</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=AAK2OLJTZRTVCWOTIDVMAE3Q7B2EVA5CNFSM4KAKS5KKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCSVNQRI#discussion_r369677097">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLJ3MTARIBWORKV4OCLQ7B2EVANCNFSM4KAKS5KA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAK2OLPVY6VKLSEDZJZ47XTQ7B2EVA5CNFSM4KAKS5KKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCSVNQRI.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=AAK2OLJTZRTVCWOTIDVMAE3Q7B2EVA5CNFSM4KAKS5KKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCSVNQRI#discussion_r369677097",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/2485?email_source=notifications\u0026email_token=AAK2OLJTZRTVCWOTIDVMAE3Q7B2EVA5CNFSM4KAKS5KKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCSVNQRI#discussion_r369677097",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>