OpenGeoscience / ktile

A stylish alternative for caching your map tiles.
http://tilestache.org
BSD 3-Clause "New" or "Revised" License
15 stars 3 forks source link

Proxy provider produces errors when served an empty tile #24

Open jpolchlo opened 7 years ago

jpolchlo commented 7 years ago

I set up a proxy provider to serve a set of tiles that cover the continental US. Requests for tiles outside the covered area are responded to with a 204 status code (correct response, empty result). The proxy provider attempts to handle the empty image as if it contained data and raises an exception leading to a spray of stack traces and 500 errors to the console. Returning a 200 with an empty image gives the same result. Responding with a 404 produces a similar torrent of console messages, but 404s instead of 500s.

There ought to be a way to communicate to the proxy provider that a tile is empty. I would suggest that such tiles respond with 204, and ktile should handle these responses correctly.