[OpenLayers-Dev] new proxy

Eric Lemoine eric.c2c at gmail.com
Sat Mar 29 18:44:17 EDT 2008


Hi

proxy.cgi not supporting PUT and DELETE I developed my own.

My proxy script, named http-proxy.py, supports GET, POST, PUT, DELETE
and probably any HTTP method. For now, http-proxy.py is mod_python
only, but it could be extended to work as a CGI script.

In contrast to proxy.cgi, the target host is placed in the URL path as
opposed to being the value of a "url" parameter.

Examples:

client -> proxy: DELETE
http://example.com/proxy/http-proxy.py/http,target.host.domain,81/foo/bar
proxy -> server: DELETE http://target.host.domain:81/foo/bar

client -> proxy : GET
http://example.com/proxy/http-proxy.py/http,target.host.domain/foo/bar?key=value
proxy -> server : GET http://target.host.domain:81/foo/bar?key=value

I just coded that up, so I'm pretty sure it won't work on any
situation. Anyway, I thought some people might be interested to know
about it.

I plan to put into MapFish, but we may consider to have it in OpenLayers.

Cheers,
--
Eric
-------------- next part --------------
A non-text attachment was scrubbed...
Name: http-proxy.py
Type: text/x-python
Size: 3503 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20080329/65fd3dfe/http-proxy.py


More information about the Dev mailing list