Skip to content

Commit 3ab3322

Browse files
committed
WMS: apply FILTER (RFC 118) vendor parameter after the CRS parameter is taken into account to avoid extent inconsistencies (found during refs #5658 investigation)
1 parent 90583b0 commit 3ab3322

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

mapwms.c

+16-16
Original file line numberDiff line numberDiff line change
@@ -1366,22 +1366,6 @@ int msWMSLoadGetMapParams(mapObj *map, int nVersion,
13661366
adjust_extent = MS_TRUE;
13671367
}
13681368

1369-
/*
1370-
** Apply vendor-specific filter if specified
1371-
*/
1372-
if (filter) {
1373-
if (sld_url || sld_body) {
1374-
msSetError(MS_WMSERR,
1375-
"Vendor-specific FILTER parameter cannot be used with SLD or SLD_BODY.",
1376-
"msWMSLoadGetMapParams()");
1377-
return msWMSException(map, nVersion, NULL, wms_exception_format);
1378-
}
1379-
1380-
if (msWMSApplyFilter(map, nVersion, filter, need_axis_swap, wms_exception_format) == MS_FAILURE) {
1381-
return MS_FAILURE;/* msWMSException(map, nVersion, "InvalidFilterRequest"); */
1382-
}
1383-
}
1384-
13851369
/*
13861370
** If any select layers have a default time, we will apply the default
13871371
** time value even if no TIME request was in the url.
@@ -1658,6 +1642,22 @@ this request. Check wms/ows_enable_request settings.",
16581642
}
16591643
}
16601644

1645+
/*
1646+
** Apply vendor-specific filter if specified
1647+
*/
1648+
if (filter) {
1649+
if (sld_url || sld_body) {
1650+
msSetError(MS_WMSERR,
1651+
"Vendor-specific FILTER parameter cannot be used with SLD or SLD_BODY.",
1652+
"msWMSLoadGetMapParams()");
1653+
return msWMSException(map, nVersion, NULL, wms_exception_format);
1654+
}
1655+
1656+
if (msWMSApplyFilter(map, nVersion, filter, need_axis_swap, wms_exception_format) == MS_FAILURE) {
1657+
return MS_FAILURE;/* msWMSException(map, nVersion, "InvalidFilterRequest"); */
1658+
}
1659+
}
1660+
16611661
if (sld_url || sld_body) {
16621662
int nLayersBefore, nLayerAfter;
16631663
char request_tmp[32];

0 commit comments

Comments
 (0)