[OSM-dev] API returns zipped data?

Tom Hughes tom at compton.nu
Sun Nov 7 11:52:59 GMT 2010


On 07/11/10 11:24, Maarten Deen wrote:

> The general information in http://wiki.openstreetmap.org/wiki/API_v0.6
> talks about that the payload may be compressed, but I'm not sure what is
> meant by payload. Is this the request going to the api or is this what
> the api returns?

What the API returns.

> It also states that this should only happen when the client indicates
> this through the HTTP "Accept" header. But the client I'm using, Lynx,
> does not do so. At least: I've never received compressed data from any
> source before.

It follows the normal HTTP protocol - if the client indicates that it is 
happy to receive compressed data (using the Accept-Encoding header) and 
it is a compression format we support then we will return compressed data.

Lynx may well set it (I have no idea if it does, but most browsers do) 
but if it does so then it will expect that the result may be compressed 
and will decompress it if necessary so it would be transparent to you.

Tom

-- 
Tom Hughes (tom at compton.nu)
http://compton.nu/



More information about the dev mailing list