Reporter: agitateDate: 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:
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: