Ticket #3845 (closed enhancement: fixed)

Opened 2 years ago

Last modified 22 months ago

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

Changed 22 months ago by havatv

  • cc havatv added
  • status changed from new to closed
  • resolution set to fixed

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

Note: See TracTickets for help on using tickets.