Skip to content

Commit 173aee6

Browse files
committedMar 13, 2013
WMS GetFeatureInfo supported formats fix, fixes #7238
1 parent 62e9e8a commit 173aee6

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed
 

‎src/providers/wms/qgswmsprovider.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1413,7 +1413,7 @@ bool QgsWmsProvider::retrieveServerCapabilities( bool forceRefresh )
14131413
// GML.1, GML.2, or GML.3
14141414
// 1.1.0, 1.3.0 - mime types, GML should use application/vnd.ogc.gml
14151415
// but in UMN Mapserver it may be also OUTPUTFORMAT, e.g. OGRGML
1416-
IdentifyFormat format;
1416+
IdentifyFormat format = IdentifyFormatUndefined;
14171417
if ( f == "MIME" )
14181418
format = IdentifyFormatText; // 1.0
14191419
else if ( f == "text/plain" )
@@ -1453,12 +1453,15 @@ void QgsWmsProvider::capabilitiesReplyFinished()
14531453

14541454
const QUrl& toUrl = redirect.toUrl();
14551455
mCapabilitiesReply->request();
1456-
if ( toUrl == mCapabilitiesReply->url() ) {
1456+
if ( toUrl == mCapabilitiesReply->url() )
1457+
{
14571458
mErrorFormat = "text/plain";
14581459
mError = tr( "Redirect loop detected: %1" ).arg( toUrl.toString() );
14591460
QgsMessageLog::logMessage( mError, tr( "WMS" ) );
14601461
mHttpCapabilitiesResponse.clear();
1461-
} else {
1462+
}
1463+
else
1464+
{
14621465
QNetworkRequest request( toUrl );
14631466
setAuthorization( request );
14641467
request.setAttribute( QNetworkRequest::CacheLoadControlAttribute, QNetworkRequest::PreferNetwork );

0 commit comments

Comments
 (0)
Please sign in to comment.