[mapserver-commits] r10191 - branches/branch-5-6/mapserver
svn at osgeo.org
svn at osgeo.org
Fri May 28 15:16:25 EDT 2010
Author: assefa
Date: 2010-05-28 15:16:24 -0400 (Fri, 28 May 2010)
New Revision: 10191
Modified:
branches/branch-5-6/mapserver/HISTORY.TXT
branches/branch-5-6/mapserver/mapwfs.c
Log:
Correct PropertyName parsing for wfs post requests (#3235)
Modified: branches/branch-5-6/mapserver/HISTORY.TXT
===================================================================
--- branches/branch-5-6/mapserver/HISTORY.TXT 2010-05-28 14:59:13 UTC (rev 10190)
+++ branches/branch-5-6/mapserver/HISTORY.TXT 2010-05-28 19:16:24 UTC (rev 10191)
@@ -15,6 +15,8 @@
Version 5.6.4 (????-??-??):
---------------------------
+- Correct PropertyName parsing for wfs post requests (#3235)
+
- Ensure mapwmslayer.c does not unlink file before closing connection on it (#3451)
- Fix security exception issue in C# with MSVC2010 (#3438)
Modified: branches/branch-5-6/mapserver/mapwfs.c
===================================================================
--- branches/branch-5-6/mapserver/mapwfs.c 2010-05-28 14:59:13 UTC (rev 10190)
+++ branches/branch-5-6/mapserver/mapwfs.c 2010-05-28 19:16:24 UTC (rev 10191)
@@ -256,7 +256,7 @@
else
{
/* Map has no SRS. Use layer SRS or produce a warning. */
- pszWfsSrs = msOWSGetEPSGProj(&(map->projection),&(map->web.metadata), "FO", MS_TRUE);
+ pszWfsSrs = msOWSGetEPSGProj(&(lp->projection),&(lp->metadata), "FO", MS_TRUE);
}
msOWSPrintEncodeParam(stdout, "(at least one of) MAP.PROJECTION, LAYER.PROJECTION or wfs_srs metadata",
@@ -1196,16 +1196,30 @@
{
if (strlen(papszPropertyName[k]) > 0)
{
- msInsertHashTable(&(lp->metadata), "GML_INCLUDE_ITEMS", papszPropertyName[k]);
+ if (strcasecmp(papszPropertyName[k], "*") == 0)
+ {
+ msInsertHashTable(&(lp->metadata), "GML_INCLUDE_ITEMS", "all");
+ }
+ /*this character is only used internally and allows postrequest to
+ have a proper property name parsing. It means do not affect what was set
+ in the map file, It is set necessary when a wfs post request is used with
+ several query elements, with some having property names and some not*/
+ else if (strcasecmp(papszPropertyName[k], "!") == 0)
+ {
+ }
+ else
+ {
+ msInsertHashTable(&(lp->metadata), "GML_INCLUDE_ITEMS", papszPropertyName[k]);
- /* exclude geometry if it was not asked for */
- if (msOWSLookupMetadata(&(lp->metadata), "OFG", "geometries") != NULL)
- sprintf(szTmp, "%s", msOWSLookupMetadata(&(lp->metadata), "OFG", "geometries"));
- else
- sprintf(szTmp, OWS_GML_DEFAULT_GEOMETRY_NAME);
+ /* exclude geometry if it was not asked for */
+ if (msOWSLookupMetadata(&(lp->metadata), "OFG", "geometries") != NULL)
+ sprintf(szTmp, "%s", msOWSLookupMetadata(&(lp->metadata), "OFG", "geometries"));
+ else
+ sprintf(szTmp, OWS_GML_DEFAULT_GEOMETRY_NAME);
- if (strstr(papszPropertyName[k], szTmp) == NULL)
- msInsertHashTable(&(lp->metadata), "GML_GEOMETRIES", "none");
+ if (strstr(papszPropertyName[k], szTmp) == NULL)
+ msInsertHashTable(&(lp->metadata), "GML_GEOMETRIES", "none");
+ }
}
else /*empty string*/
msInsertHashTable(&(lp->metadata), "GML_GEOMETRIES", "none");
@@ -2249,9 +2263,9 @@
/* -------------------------------------------------------------------- */
/* Parse typenames and filters. If there are multiple queries, */
-/* typenames will be build with comma between thme */
+/* typenames will be build with comma between them */
/* (typename1,typename2,...) and filters will be build with */
-/* bracets enclosinf the filters :(filter1)(filter2)... */
+/* brackets enclosing the filters :(filter1)(filter2)... */
/* propertynames are stored like (property1,property2)(property1) */
/* -------------------------------------------------------------------- */
while (psQuery && psQuery->pszValue &&
@@ -2289,9 +2303,9 @@
psPropertyName = CPLGetXMLNode(psQuery, "PropertyName");
pszTmp2= NULL;
- /*when there is no PropertyName, we outpout () so that it is parsed properly in GetFeature*/
+ /*when there is no PropertyName, we outpout (!) so that it is parsed properly in GetFeature*/
if (psPropertyName == NULL)
- pszTmp2 = strdup("");
+ pszTmp2 = strdup("!");
while (psPropertyName)
{
More information about the mapserver-commits
mailing list