@@ -2990,19 +2990,25 @@ QUrl QgsWmsProvider::getLegendGraphicFullURL( double scale, const QgsRectangle&
2990
2990
2991
2991
QUrl url ( lurl );
2992
2992
2993
- if ( !url.hasQueryItem ( " SERVICE" ) )
2993
+ // query names are NOT case-sensitive, so make an uppercase list for proper comparison
2994
+ QStringList qnames = QStringList ();
2995
+ for ( int i = 0 ; i < url.queryItems ().size (); i++ )
2996
+ {
2997
+ qnames << url.queryItems ().at ( i ).first .toUpper ();
2998
+ }
2999
+ if ( !qnames.contains ( " SERVICE" ) )
2994
3000
setQueryItem ( url, " SERVICE" , " WMS" );
2995
- if ( !url. hasQueryItem ( " VERSION" ) )
3001
+ if ( !qnames. contains ( " VERSION" ) )
2996
3002
setQueryItem ( url, " VERSION" , mCaps .mCapabilities .version );
2997
- if ( !url. hasQueryItem ( " SLD_VERSION" ) )
3003
+ if ( !qnames. contains ( " SLD_VERSION" ) )
2998
3004
setQueryItem ( url, " SLD_VERSION" , " 1.1.0" ); // can not determine SLD_VERSION
2999
- if ( !url. hasQueryItem ( " REQUEST" ) )
3005
+ if ( !qnames. contains ( " REQUEST" ) )
3000
3006
setQueryItem ( url, " REQUEST" , " GetLegendGraphic" );
3001
- if ( !url. hasQueryItem ( " FORMAT" ) )
3007
+ if ( !qnames. contains ( " FORMAT" ) )
3002
3008
setFormatQueryItem ( url );
3003
- if ( !url. hasQueryItem ( " LAYER" ) )
3009
+ if ( !qnames. contains ( " LAYER" ) )
3004
3010
setQueryItem ( url, " LAYER" , mSettings .mActiveSubLayers [0 ] );
3005
- if ( !url. hasQueryItem ( " STYLE" ) )
3011
+ if ( !qnames. contains ( " STYLE" ) )
3006
3012
setQueryItem ( url, " STYLE" , mSettings .mActiveSubStyles [0 ] );
3007
3013
3008
3014
// add config parameter related to resolution
0 commit comments