[MapProxy] Configure external wms that requires basic auth

Oliver Tonnhofer olt at omniscale.de
Thu Oct 17 23:47:42 PDT 2013


On 17.10.2013, at 21:43, Rahkonen Jukka wrote:
> The 200 - 3177 feels odd. Is it possible that the line is taken from a server log file and 200 could mean the http code for the result (200 OK) and 3177 the size of the response?

Yes, 200 is the status code, the dash is the content-length (which was not set by the server in this case) and 3177 is the time it took in milliseconds.

> I am sure that I have used MapProxy with https and basic authentication simply by giving the WMS server URL as https://user:passwd@server.com...
> I do not understand why it does not work for you. Are you also behind a proxy server?

It's strange. A missing http_proxy normally results in blocked connections or timeouts due to firewall restrictions. An empty image as a response looks more like the source WMS "blocks" the requests (by server IP, user-agent, typo in password, etc.). A well behaved server should respond with 401 or 403 in this case, but thats theory...

@Karsten: Can you curl the image from your MapProxy server?

curl --user yourusername "http://geo.myserver.org/proxy.php?layers=images&width=600&version=1.1.1&bbox=4268292.15725,5251787.80344,4638833.19507,5730276.96684&service=WMS&format=image%2Fpng&styles=&srs=EPSG%3A31468&request=GetMap&height=775" -o /tmp/out.png -D - -s


Oliver Tonnhofer    | Omniscale GmbH & Co KG    | http://omniscale.com
http://mapproxy.org | https://github.com/olt    | @oltonn

More information about the MapProxy mailing list