From e5797e687b147153a8b83b39224b0725bfc77282 Mon Sep 17 00:00:00 2001 From: Alessandro Pasotti Date: Sat, 9 Mar 2019 17:06:03 +0100 Subject: [PATCH] [server] Fix error message reported when QUERY_LAYERS is missing According to WMS 1.3.0 specs: 7.4.3.4 QUERY_LAYERS The mandatory QUERY_LAYERS parameter states the map layer(s) from which feature information is desired to be retrieved. Its value is a comma-separated list of one or more map layers. This parameter shall contain at least one layer name, but may contain fewer layers than the original GetMap request. If any layer in the QUERY_LAYERS parameter is not defined in the service metadata of the WMS, the server shall issue a service exception (code = LayerNotDefined). --- src/server/services/wms/qgswmsrenderer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/services/wms/qgswmsrenderer.cpp b/src/server/services/wms/qgswmsrenderer.cpp index 286602c7683..7636e1618ee 100644 --- a/src/server/services/wms/qgswmsrenderer.cpp +++ b/src/server/services/wms/qgswmsrenderer.cpp @@ -1028,7 +1028,7 @@ namespace QgsWms if ( queryLayers.isEmpty() ) { QString msg = QObject::tr( "QUERY_LAYERS parameter is required for GetFeatureInfo" ); - throw QgsBadRequestException( QStringLiteral( "LayerNotQueryable" ), msg ); + throw QgsBadRequestException( QStringLiteral( "LayerNotDefined" ), msg ); } // The I/J parameters are Mandatory if they are not replaced by X/Y or FILTER or FILTER_GEOM