Skip to content
Browse files

[server] Fix error message reported when QUERY_LAYERS is missing

According to WMS 1.3.0 specs:
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).
  • Loading branch information
elpaso committed Mar 9, 2019
1 parent 3919eef commit c38ad5585220816f373de1e92b2525d762cb1e01
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/server/services/wms/qgswmsrenderer.cpp
@@ -1024,7 +1024,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

0 comments on commit c38ad55

Please sign in to comment.
You can’t perform that action at this time.