Skip to content

Commit

Permalink
WMS GetFeatureInfo supported formats fix, fixes #7238
Browse files Browse the repository at this point in the history
  • Loading branch information
blazek committed Mar 13, 2013
1 parent 62e9e8a commit 173aee6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/providers/wms/qgswmsprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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" )
Expand Down Expand Up @@ -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 );
Expand Down

0 comments on commit 173aee6

Please sign in to comment.