Opened 14 years ago
Last modified 14 years ago
#3571 closed defect
Duplicated XML and HTML errors from WFS GetFeature — at Initial Version
Reported by: | warmerdam | Owned by: | mapserverbugs |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | WFS Server | Version: | svn-trunk (development) |
Severity: | normal | Keywords: | |
Cc: | aboudreault, tomkralidis |
Description
If I do the following with a simple wfs service:
./mapserv QUERY_STRING="map=test.map&SERVICE=0.0&REQUEST=GetFeature&OUTPUTFORMAT=GML2"
I get:
Content-type: text/xml <?xml version='1.0' encoding="ISO-8859-1" ?> <ServiceExceptionReport version="1.2.0" xmlns="http://www.opengis.net/ogc" xmlns :xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www. opengis.net/ogc http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd"> <ServiceException code="MissingParameterValue" locator="typename"> msWFSGetFeature(): WFS server error. Incomplete WFS request: TYPENAME parameter missing </ServiceException> </ServiceExceptionReport> Content-type: text/html <HTML> <HEAD><TITLE>MapServer Message</TITLE></HEAD> <!-- MapServer version 5.7-dev OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUT PUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS _SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WCS_SERVER SUPPORTS=SOS _SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=OGR INPUT=GDAL INP UT=SHAPEFILE --> <BODY BGCOLOR="#FFFFFF"> msWFSGetFeature(): WFS server error. Incomplete WFS request: TYPENAME parameter missing </BODY></HTML>
on "stdout". The code producing this looks like:
if (paramsObj->pszTypeName==NULL && paramsObj->pszFeatureId == NULL) { msSetError(MS_WFSERR, "Incomplete WFS request: TYPENAME parameter missing", "msWFSGetFeature()"); return msWFSException(map, "typename", "MissingParameterValue", paramsObj->pszVersion); }
The problem seems to be that msWFSException() is properly incorporating the error message in the xml exception but it is also getting reissued as html further up the call stack. I assume this is undesired behavior but I'm hesitant to fiddle with stuff too much without knowing how this was intended to work.
Thoughts? Would you like me to investigate clearing the error stack in msWFSException() or otherwise tracking that html errors should not be issued after a failed wfs action?