[openstreetmap/openstreetmap-website] old user preferences containing "%" break PUT on /api/0.6/user/preferences (Issue #4467)
mmd
notifications at github.com
Mon Jan 15 20:40:54 UTC 2024
So in this particular case, overpass turbo is indeed sending a request with Content-Type application/x-www-form-urlencoded, although the code explicitly requested Content-Type text/xml earlier on. I haven't investigated in more detail why this is happening. I'd say the issue would have to be fixed on overpass turbo side.
> Should we treat all requests to the XML api as application/xml by default, to avoid this from happening? Or should we start throwing errors for incorrect content types, so that developers find this out during testing rather than user reports year(s) later?
Throwing errors for unsupported content types sounds like the better approach. I'm a bit worried that such a change might cause too much breakage. Since we're not mentioning the Content-Type header even once on the OSM API 0.6 wiki page, people might use whatever value that happens to work somehow.
An aggregated log with e.g. User-Agent and Content-Type for a given endpoint might be useful to better understand how much of a problem this really is.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/4467#issuecomment-1892742821
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/issues/4467/1892742821 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240115/fc6eb067/attachment.htm>
More information about the rails-dev
mailing list