[mapserver-commits] r12643 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Fri Oct 7 15:40:48 EDT 2011
Author: assefa
Date: 2011-10-07 12:40:47 -0700 (Fri, 07 Oct 2011)
New Revision: 12643
Modified:
trunk/mapserver/mapwms.c
Log:
Empty LAYERS parameter is also valid when SLD is provided (#1166)
Modified: trunk/mapserver/mapwms.c
===================================================================
--- trunk/mapserver/mapwms.c 2011-10-07 18:03:06 UTC (rev 12642)
+++ trunk/mapserver/mapwms.c 2011-10-07 19:40:47 UTC (rev 12643)
@@ -477,6 +477,7 @@
layers = msStringSplit(values[i], ',', &numlayers);
if (layers==NULL || strlen(values[i]) <=0 || numlayers < 1)
{
+ numlayers = 0;
if (sld_url == NULL && sld_body == NULL)
{
msSetError(MS_WMSERR, "At least one layer name required in LAYERS.",
@@ -540,7 +541,7 @@
layerfound = 1;
}
}
- if (layerfound == 0)
+ if (layerfound == 0 && numlayers>0)
invalidlayers++;
}
@@ -3034,7 +3035,7 @@
}
else
- img = msDrawMap(map, MS_FALSE);
+ img = msDrawMap(map, MS_FALSE);
if (img == NULL)
return msWMSException(map, nVersion, NULL, wms_exception_format);
More information about the mapserver-commits
mailing list