From 173aee6e3204a8845c4929836fa894fd506ae986 Mon Sep 17 00:00:00 2001 From: Radim Blazek Date: Wed, 13 Mar 2013 09:47:52 +0100 Subject: [PATCH] WMS GetFeatureInfo supported formats fix, fixes #7238 --- src/providers/wms/qgswmsprovider.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/providers/wms/qgswmsprovider.cpp b/src/providers/wms/qgswmsprovider.cpp index 9b2e8b946db..5e96f3ec923 100644 --- a/src/providers/wms/qgswmsprovider.cpp +++ b/src/providers/wms/qgswmsprovider.cpp @@ -1413,7 +1413,7 @@ bool QgsWmsProvider::retrieveServerCapabilities( bool forceRefresh ) // GML.1, GML.2, or GML.3 // 1.1.0, 1.3.0 - mime types, GML should use application/vnd.ogc.gml // but in UMN Mapserver it may be also OUTPUTFORMAT, e.g. OGRGML - IdentifyFormat format; + IdentifyFormat format = IdentifyFormatUndefined; if ( f == "MIME" ) format = IdentifyFormatText; // 1.0 else if ( f == "text/plain" ) @@ -1453,12 +1453,15 @@ void QgsWmsProvider::capabilitiesReplyFinished() const QUrl& toUrl = redirect.toUrl(); mCapabilitiesReply->request(); - if ( toUrl == mCapabilitiesReply->url() ) { + if ( toUrl == mCapabilitiesReply->url() ) + { mErrorFormat = "text/plain"; mError = tr( "Redirect loop detected: %1" ).arg( toUrl.toString() ); QgsMessageLog::logMessage( mError, tr( "WMS" ) ); mHttpCapabilitiesResponse.clear(); - } else { + } + else + { QNetworkRequest request( toUrl ); setAuthorization( request ); request.setAttribute( QNetworkRequest::CacheLoadControlAttribute, QNetworkRequest::PreferNetwork );