[MapProxy] error parsing tms sources with ampersand in url

Jonathan Moules jonathan-lists at lightpear.com
Wed Jun 19 01:43:18 PDT 2019


Hi Travis,

I suspect the given TMS url is invalid. I don't believe you're allowed 
to have @ characters unencoded in a URL except for their explicit 
reserved use:

https://stackoverflow.com/questions/1856785/characters-allowed-in-a-url

Anything prefixing an @ character is considered to be username/password, 
with the hostname appearing after the @, thus the url parser thiks the 
hostname is "gmaps". I'd suggest the TMS URL needs to be fixed.

Cheers,

Jonathan


On 10/06/2019 17:26, Travis Kirstine wrote:
> I recently updated to mapproxy  1.12.0a-20190605 and having issues 
> with the parsing of the source tms url which contain an @ which is 
> used in MapCache.  In the mapproxy log it appears the url path before 
> the @ is removed resulting in
>
> "could not retrieve tile: No response from URL 
> "http://gmaps/10/186/688.xxx": Name or service not known"
>
> ## source tms
>    lacombe_2015_tms:
>       type: tile
>       url: 
> 'http://foobar.com/mapcache/tms/1.0.0/lacombe@gmaps/%(tms_path)s.xxx 
> <http://foobar.com/mapcache/tms/1.0.0/lacombe@gmaps/%%28tms_path%29s.xxx>'
>       grid: spherical_mercator
>       transparent: true
>       on_error:
>          404:
>             response: transparent
>             cache: false
>       coverage:
>          datasource: "PG: dbname='db' host='db' user='db' password='db'"
>          where: 'SELECT boundary_3857 FROM layer WHERE id = 314'
>          srs: 'EPSG:3857'
>
> This worked in version 1.10 and 1.11
>
>
>
>
>
>
> _______________________________________________
> MapProxy mailing list
> MapProxy at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapproxy

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20190619/c92ddfa8/attachment.html>


More information about the MapProxy mailing list