Skip to content

Commit

Permalink
Don't accept text/xml for MapServer WMS, the response cannot be parsed
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro committed Feb 14, 2023
1 parent 5056c00 commit c6cadb4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/providers/wms/qgswmscapabilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit c6cadb4

Please sign in to comment.