From 07849072a68a54f3b6cce59b4d8ebfa38a203369 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Tue, 14 Feb 2023 13:38:50 +0100 Subject: [PATCH] Don't accept text/xml for MapServer WMS, the response cannot be parsed --- src/providers/wms/qgswmscapabilities.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 );