Opened 13 years ago

Closed 13 years ago

#3845 closed enhancement (fixed)

The "A simple CGI wrapper" solution is over complicated

Reported by: agitate Owned by: jmckenna
Priority: normal Milestone:
Component: Documentation - MapServer Version: 5.6
Severity: normal Keywords: wrapper, cgi, mapfile
Cc: havatv

Description

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}

Change History (1)

comment:1 by havatv, 13 years ago

Cc: havatv added
Resolution: fixed
Status: newclosed

Fixed for 6.0 and trunk in r12005. Added the proposed wrapper as an alternative.

Note: See TracTickets for help on using tickets.