openstreetmap / operations

OSMF Operations Working Group issue tracking
https://operations.osmfoundation.org/
99 stars 12 forks source link

No compression on osm.org "Map Notes" layer #1089

Closed mmd-osm closed 5 months ago

mmd-osm commented 5 months ago

Although my browser has requested the "Map Notes" layer with compression, the response appears to be uncompressed.

I believe this could be somehow related to the ".json" suffix in the URL below. Either removing ".json", or replacing it by ".xml" enables compression again. Since this might be some Apache setting, I've opened the issue on the operations repo.

Sample request:

curl 'https://www.openstreetmap.org/api/0.6/notes.json?bbox=17.354106903076175,52.47713460532417,17.810554504394535,52.556316065406556'  -H 'Accept: */*' -H 'Accept-Language: en' -H 'Accept-Encoding: gzip, deflate, br, zstd'
tomhughes commented 5 months ago

You haven't requested it with compression, you have said you are able to accept compression if the server so chooses. Apparently it chose not to in this case.

In any case I don't believe this is an operational matter as I don't believe we use apache on the fly compression at all.

tomhughes commented 5 months ago

Actually maybe we do, but you confused me with the suggestion that this was specific to the .json extension but it isn't as it happens for any JSON response regardless of extension.

tomhughes commented 5 months ago

Yes you can get JSON with /notes if you set Accept: application/json in the request - you don't need the extension.

tomhughes commented 5 months ago

The other thing was that it's part of our generic apache configuration so I couldn't see it in the web site config at all.

Now fixed in https://github.com/openstreetmap/chef/commit/49e19a7a4e7f7bc9de1a072d2f6250d63d0ea35d anyway.

mmd-osm commented 5 months ago

Apologies, there's been a bit of an overlap of my answer with your update. Thank you for the quick fix!