@@ -2952,19 +2952,25 @@ QUrl QgsWmsProvider::getLegendGraphicFullURL( double scale, const QgsRectangle&
2952
2952
2953
2953
QUrl url ( lurl );
2954
2954
2955
- if ( !url.hasQueryItem ( " SERVICE" ) )
2955
+ // query names are NOT case-sensitive, so make an uppercase list for proper comparison
2956
+ QStringList qnames = QStringList ();
2957
+ for ( int i = 0 ; i < url.queryItems ().size (); i++ )
2958
+ {
2959
+ qnames << url.queryItems ().at ( i ).first .toUpper ();
2960
+ }
2961
+ if ( !qnames.contains ( " SERVICE" ) )
2956
2962
setQueryItem ( url, " SERVICE" , " WMS" );
2957
- if ( !url. hasQueryItem ( " VERSION" ) )
2963
+ if ( !qnames. contains ( " VERSION" ) )
2958
2964
setQueryItem ( url, " VERSION" , mCaps .mCapabilities .version );
2959
- if ( !url. hasQueryItem ( " SLD_VERSION" ) )
2965
+ if ( !qnames. contains ( " SLD_VERSION" ) )
2960
2966
setQueryItem ( url, " SLD_VERSION" , " 1.1.0" ); // can not determine SLD_VERSION
2961
- if ( !url. hasQueryItem ( " REQUEST" ) )
2967
+ if ( !qnames. contains ( " REQUEST" ) )
2962
2968
setQueryItem ( url, " REQUEST" , " GetLegendGraphic" );
2963
- if ( !url. hasQueryItem ( " FORMAT" ) )
2969
+ if ( !qnames. contains ( " FORMAT" ) )
2964
2970
setFormatQueryItem ( url );
2965
- if ( !url. hasQueryItem ( " LAYER" ) )
2971
+ if ( !qnames. contains ( " LAYER" ) )
2966
2972
setQueryItem ( url, " LAYER" , mSettings .mActiveSubLayers [0 ] );
2967
- if ( !url. hasQueryItem ( " STYLE" ) )
2973
+ if ( !qnames. contains ( " STYLE" ) )
2968
2974
setQueryItem ( url, " STYLE" , mSettings .mActiveSubStyles [0 ] );
2969
2975
2970
2976
// add config parameter related to resolution
0 commit comments