Le jeudi 02 octobre 2014 20:45:26, Lime, Steve D (MNIT) a écrit : > You were aware of the -nh option for mapserv, right?
Steve, Ah, good point, actually, I was not.... I should have asked first. But -nh doesn't seem to work. At least not in the WMS or WFS cases. It seems mapio.c doesn't honour mapserv->sendheaders, and the WMS or WFS code doesn't test it either By looking at the places where sendheaders is used, it seems that you must test sendheaders at each place where msIO_setHeader() is called. Whereas my change does put the test inside msIO_setHeader() itself. Which is less error prone I think. But we cannot decently let both mechanisms in place I see also some places that directly mess with sendheaders. Not sure why... ../maptemplate.c: mapserv->sendheaders = MS_TRUE; ../maptemplate.c: mapserv->sendheaders = MS_FALSE; ../mapwfs.c: mapserv->sendheaders = MS_TRUE; Even > ________________________________________ > From: mapserver-dev-boun...@lists.osgeo.org > [mapserver-dev-boun...@lists.osgeo.org] on behalf of Even Rouault > [even.roua...@spatialys.com] Sent: Thursday, October 02, 2014 1:44 PM > To: mapserver-...@lists.osgeo.org > Subject: [mapserver-dev] New env. var. to make it easier to test/debug web > services > > Hi, > > I always get annoyed when running mapserv from command line and wanting to > test/debug WMS, WFS, etc... without launching mapserv as a CGI, because > the HTTP headers get emitted and thus produce an invalid PNG or GML. > So I've pushed in master a small enhancement. If MS_HTTP_HEADER=NO is set > as environmenet variable, the HTTP headers are not emitted. > > So now you can do things like : > > MS_HTTP_HEADER=NO mapserv QUERY_STRING="map=test.map&SERVICE=WMS&..." > > out.png && display out.png MS_HTTP_HEADER=NO mapserv > QUERY_STRING="map=test.map&SERVICE=WFS&..." | xmllint -noout - > > Even > > -- > Spatialys - Geospatial professional services > http://www.spatialys.com > _______________________________________________ > mapserver-dev mailing list > mapserver-...@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-dev -- Spatialys - Geospatial professional services http://www.spatialys.com _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev