MapServer / MapServer-import

3 stars 2 forks source link

The "A simple CGI wrapper" solution is over complicated #2243

Closed mapserver-bot closed 12 years ago

mapserver-bot commented 12 years ago

Reporter: agitate Date: 2011/04/15 - 13:23 The documentation for the "simple CGI wrapper" presents a solution to avoid specifying the map file within the query. It works well for GET requests but doesn't support POST requests. After looking at the mapserv.c code, I noticed that you can simply set the MS_MAPFILE environment variable to specify the map file to use. The wrapper can be much simplified using this method, and will also support GET and POST requests. The new code for the shell script can be simplified as:

#!/bin/sh

MAPSERV="/path/to/my/mapserv"

MS_MAPFILE="/path/to/my/mapfile.map" exec ${MAPSERV}
mapserver-bot commented 12 years ago

Author: havatv Date: 2011/08/05 - 13:02 Fixed for 6.0 and trunk in (r12005). Added the proposed wrapper as an alternative.