[mapserver-dev] [gdal-dev] New env. var. to make it easier to test/debug web services
Even Rouault
even.rouault at spatialys.com
Thu Oct 2 13:25:03 PDT 2014
Le jeudi 02 octobre 2014 22:18:27, Jeff McKenna a écrit :
> On 2014-10-02 5:09 PM, Even Rouault wrote:
> > Le jeudi 02 octobre 2014 21:41:20, Jeff McKenna a écrit :
> >> On 2014-10-02 4:24 PM, Even Rouault wrote:
> >>> Le jeudi 02 octobre 2014 21:01:58, Even Rouault a écrit :
> >>>> Le jeudi 02 octobre 2014 20:57:46, Lime, Steve D (MNIT) a écrit :
> >>>>> How about making -nh set the environment variable programatically and
> >>>>> losing the sendheaders checks?
> >>>>
> >>>> Yes, that's a possibility. Although I think -nh could just call a
> >>>> function to disable the boolean in msio instead of messing with
> >>>> environmenet variables.
> >>>
> >>> I've just implemented that. So no more env. variable trick. Just the
> >>> standard -nh mechanism.
> >>>
> >>> Would be cool to have a "mapserv --help" mode to display available
> >>> options, wouldn't it ?
> >>
> >> Would be super cool! It would list the -nh and -v options (I don't know
> >> of other options).
> >
> > With my latest commit, and default configuration :
> >
> > $ mapserv --help
> > Usage: mapserv [--help] [-v] [-nh] [QUERY_STRING=value]
> >
> > Options :
> > -h, --help Display this help message
> > -v Display version and exit.
> > -nh Suppress HTTP headers in CGI mode.
> > QUERY_STRING=value Set the QUERY_STRING in GET request mode.
> >
> > When compiled with -DMS_ENABLE_CGI_CL_DEBUG_ARGS
> >
> > $ mapserv --help
> > Usage: mapserv [--help] [-v] [-nh] [QUERY_STRING=value]
> >
> > [-tmpbase dirname] [-t mapfilename] [MS_ERRORFILE=value]
> > [MS_DEBUGLEVEL=value]
> >
> > Options :
> > -h, --help Display this help message
> > -v Display version and exit.
> > -nh Suppress HTTP headers in CGI mode.
> > QUERY_STRING=value Set the QUERY_STRING in GET request mode.
> > -tmpbase dirname Define a forced temporary directory.
> > -t mapfilename Display the tokens of the mapfile after
> > parsing. MS_ERRORFILE=filename Set error file.
> > MS_DEBUGLEVEL=value Set debug level.
>
> Wow that is great.
>
> Why limit the other options with a specific compile setting though?
I didn't change this. They are currently enabled conditionaly. I'm not sure
why. Perhaps for security reasons, since they imply reading a file (-t),
overriding the temporary directory (-tmpbase), creating a file (MS_ERRORFILE) ?
/* Keep only "-v", "-nh" and "QUERY_STRING=..." enabled by default.
* The others will require an explicit -DMS_ENABLE_CGI_CL_DEBUG_ARGS
* at compile time.
*/
>
> >> The default message is, not fully correct:
> >> "This script can only be used to decode form results and should be
> >>
> >> initiated as a CGI process via a httpd server"
> >
> > Any suggestion ?
>
> How about: "This script is commonly used to decode form results and
> should be initiated as a CGI process via an httpd server. For other
> options please try using the --help switch."
>
Done
> -jeff
>
>
>
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the mapserver-dev
mailing list