Yaouh! out (update for tangogps maps)

Rask Ingemann Lambertsen rask at sygehus.dk
Sat Jan 17 17:52:13 CET 2009


On Fri, Jan 16, 2009 at 04:12:19PM +0100, Tilman Baumann wrote:
> 
> Untested code:
> 
>   import httplib
>   conn = httplib.HTTPConnection("tile.openstreetmap.org")
>   conn.request("HEAD", "/file...")
>   r1 = conn.getresponse()
>   print r1.status, r1.reason
>   etag = getheader("ETag")
>   print etag
> 
> And if stuff was new, make GET instead of HEAD

   It sure would be more efficient if OSM supported the If-Modified-Since:
header in a GET request. Then you wouldn't need the HEAD request.

   Also, consider using the same connection for multiple requests. It ought
to help a lot with such small files.

-- 
Rask Ingemann Lambertsen
Danish law requires addresses in e-mail to be logged and stored for a year




More information about the community mailing list