[OpenLayers-Users] OpenLayers.Ajax.Request() with Apache/mod_python

Christopher Schmidt crschmidt at metacarta.com
Wed Nov 28 11:06:20 EST 2007


On Wed, Nov 28, 2007 at 04:50:45PM +0100, David E. Reksten wrote:
> I have succesfully set up a WMS service using Geoserver/TileCache and
> made a browser app with OpenLayers. It works beautifully. I have added
> an EditingToolbar to draw polygons etc. and I'm now working out how to
> send the features back to the server.
> 
> I have configured Apache 2 with mod_python, but I'm unable to get
> Apache to pass the text/xml POSTed by OpenLayers.Ajax.Request() to my
> Python script, probably due to this issue:
> https://issues.apache.org/jira/browse/MODPYTHON-29

Are you setting a content-type request header?  

> Any ideas or suggestions on how to pass a GeoJSON string/object back
> to Apache from OpenLayers? Is FeatureServer my best bet here? I'd
> rather not stack my dependencies too high, if that's avoidable.

Well, what is your server side code now? Is it a custom written
mod_python handler? FeatureServer, as far as I know, works with
mod_python -- I think I've successfully configured it that way -- so you
might look to FeatureServer just for the inspiration of how to parse the
requests.

(Essentially, you shouldn't be calling util.FieldStorage() unless you've
got params in the QUERY_STRING... and possibly not even then, due to the
bug you pointed out.)  

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list