You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the WMS spec using an empty style name in the STYLES parameter should be treated as "default". But using a request with ...&layers=a,b,c&styles=a,,&... fails with "[...] Mapserver is expecting an empty string for the STYLES [...]".
The problem seems to be in msWMSLoadGetMapParams() where the msStringSplit() is used which throws empty tokens away. The following patch uses msStringSplitComplex() with the ALLOWEMPTYTOKENS flag set and seems to solve that problem:
diff --git a/mapwms.c b/mapwms.c
index d02c667..037441b 100644
--- a/mapwms.c
+++ b/mapwms.c
@@ -1108,7 +1108,7 @@ int msWMSLoadGetMapParams(mapObj *map, int nVersion,
int numlayers =0;
layerObj *lp = NULL;
- tokens = msStringSplit(styles, ',' ,&n);
+ tokens = msStringSplitComplex(styles, ","
,&n,MS_ALLOWEMPTYTOKENS);
for (i=0; i<n; i++)
{
if (tokens[i] && strlen(tokens[i]) > 0 &&
The text was updated successfully, but these errors were encountered:
According to the WMS spec using an empty style name in the STYLES parameter should be treated as "default". But using a request with ...&layers=a,b,c&styles=a,,&... fails with "[...] Mapserver is expecting an empty string for the STYLES [...]".
The problem seems to be in msWMSLoadGetMapParams() where the msStringSplit() is used which throws empty tokens away. The following patch uses msStringSplitComplex() with the ALLOWEMPTYTOKENS flag set and seems to solve that problem:
The text was updated successfully, but these errors were encountered: