[mapserver-commits] r7682 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Mon Jun 16 19:01:14 EDT 2008


Author: tomkralidis
Date: 2008-06-16 19:01:13 -0400 (Mon, 16 Jun 2008)
New Revision: 7682

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/mapwfs.c
Log:
do not return error for empty query results (#2444)



Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2008-06-16 14:07:18 UTC (rev 7681)
+++ trunk/mapserver/HISTORY.TXT	2008-06-16 23:01:13 UTC (rev 7682)
@@ -13,6 +13,8 @@
 Current Version (SVN trunk):
 ----------------------------
 
+- mapwfs.c: do not return error for empty query results (#2444)
+
 - Remove C++-style comments and most other warnings thrown by -pedantic (#2598)
 
 - mapwfs.c/mapwfs11.c: set GML MIME type correctly

Modified: trunk/mapserver/mapwfs.c
===================================================================
--- trunk/mapserver/mapwfs.c	2008-06-16 14:07:18 UTC (rev 7681)
+++ trunk/mapserver/mapwfs.c	2008-06-16 23:01:13 UTC (rev 7682)
@@ -1309,10 +1309,9 @@
         /*preparse the filter for gml aliases*/
         FLTPreParseFilterForAlias(psNode, map, iLayerIndex, "G");
 
-	if( FLTApplyFilterToLayer(psNode, map, iLayerIndex, MS_FALSE) != MS_SUCCESS ) {
-          msSetError(MS_WFSERR, "FLTApplyFilterToLayer() failed", "msWFSGetFeature()", pszFilter);
-	  return msWFSException(map, "mapserv", "NoApplicableCode", paramsObj->pszVersion);
-        }
+        /* run filter.  If no results are found, do not throw exception */
+        /* this is a null result */
+	FLTApplyFilterToLayer(psNode, map, iLayerIndex, MS_FALSE);
 
         FLTFreeFilterEncodingNode( psNode );
         psNode = NULL;
@@ -1405,7 +1404,7 @@
 
                      if( FLTApplyFilterToLayer(psNode, map, lp->index, MS_FALSE) != MS_SUCCESS ) {
                        msSetError(MS_WFSERR, "FLTApplyFilterToLayer() failed", "msWFSGetFeature");
-                       return msWFSException(map, "mapserv", "InvalidMapfile", paramsObj->pszVersion);
+                       return msWFSException(map, "mapserv", "NoApplicableCode", paramsObj->pszVersion);
                      }
 
                      FLTFreeFilterEncodingNode( psNode );



More information about the mapserver-commits mailing list