Skip to content

Commit

Permalink
WMS: apply FILTER (RFC 118) vendor parameter after the CRS parameter …
Browse files Browse the repository at this point in the history
…is taken into account to avoid extent inconsistencies (found during refs #5658 investigation)
  • Loading branch information
rouault committed Jan 30, 2019
1 parent 90583b0 commit 3ab3322
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions mapwms.c
Expand Up @@ -1366,22 +1366,6 @@ int msWMSLoadGetMapParams(mapObj *map, int nVersion,
adjust_extent = MS_TRUE;
}

/*
** Apply vendor-specific filter if specified
*/
if (filter) {
if (sld_url || sld_body) {
msSetError(MS_WMSERR,
"Vendor-specific FILTER parameter cannot be used with SLD or SLD_BODY.",
"msWMSLoadGetMapParams()");
return msWMSException(map, nVersion, NULL, wms_exception_format);
}

if (msWMSApplyFilter(map, nVersion, filter, need_axis_swap, wms_exception_format) == MS_FAILURE) {
return MS_FAILURE;/* msWMSException(map, nVersion, "InvalidFilterRequest"); */
}
}

/*
** If any select layers have a default time, we will apply the default
** time value even if no TIME request was in the url.
Expand Down Expand Up @@ -1658,6 +1642,22 @@ this request. Check wms/ows_enable_request settings.",
}
}

/*
** Apply vendor-specific filter if specified
*/
if (filter) {
if (sld_url || sld_body) {
msSetError(MS_WMSERR,
"Vendor-specific FILTER parameter cannot be used with SLD or SLD_BODY.",
"msWMSLoadGetMapParams()");
return msWMSException(map, nVersion, NULL, wms_exception_format);
}

if (msWMSApplyFilter(map, nVersion, filter, need_axis_swap, wms_exception_format) == MS_FAILURE) {
return MS_FAILURE;/* msWMSException(map, nVersion, "InvalidFilterRequest"); */
}
}

if (sld_url || sld_body) {
int nLayersBefore, nLayerAfter;
char request_tmp[32];
Expand Down

0 comments on commit 3ab3322

Please sign in to comment.