[openstreetmap/openstreetmap-website] JSON output nodes, ways, relations, map (#2485)
mmd
notifications at github.com
Wed Jan 22 15:38:24 UTC 2020
mmd-osm commented on this pull request.
> + 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
TODO: Add a comment here, that we deliberately don't set request.format, in case not XML, JSON or */* was requested, so that an HTTP error is returned back to the client.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/2485#pullrequestreview-346684543
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20200122/a83de664/attachment.htm>
More information about the rails-dev
mailing list