diff --git a/src/providers/wms/qgswmscapabilities.cpp b/src/providers/wms/qgswmscapabilities.cpp index 8097cff502b84..afe761c1f0ff7 100644 --- a/src/providers/wms/qgswmscapabilities.cpp +++ b/src/providers/wms/qgswmscapabilities.cpp @@ -538,7 +538,7 @@ bool QgsWmsCapabilities::parseResponse( const QByteArray &response, QgsWmsParser format = QgsRaster::IdentifyFormatFeature; else if ( f.contains( QLatin1String( "gml" ), Qt::CaseInsensitive ) ) format = QgsRaster::IdentifyFormatFeature; - else if ( f == QLatin1String( "text/xml" ) ) + else if ( f == QLatin1String( "text/xml" ) && !mBaseUrl.contains( "MapServer" ) ) // Don't accept text/xml for MapServer WMS, the response cannot be parsed format = QgsRaster::IdentifyFormatFeature; mIdentifyFormats.insert( format, f );