@@ -801,10 +801,10 @@ void QgsWmsProvider::tileReplyFinished()
801
801
802
802
QString contentType = reply->header ( QNetworkRequest::ContentTypeHeader ).toString ();
803
803
QgsDebugMsg ( " contentType: " + contentType );
804
- if ( !contentType.startsWith ( " image/" ) )
804
+ if ( !contentType.startsWith ( " image/" , Qt::CaseInsensitive ) )
805
805
{
806
806
QByteArray text = reply->readAll ();
807
- if ( contentType == " text/xml" && parseServiceExceptionReportDom ( text ) )
807
+ if ( contentType. toLower () == " text/xml" && parseServiceExceptionReportDom ( text ) )
808
808
{
809
809
showMessageBox ( mErrorCaption , mError );
810
810
}
@@ -909,7 +909,7 @@ void QgsWmsProvider::cacheReplyFinished()
909
909
910
910
QString contentType = cacheReply->header ( QNetworkRequest::ContentTypeHeader ).toString ();
911
911
QgsDebugMsg ( " contentType: " + contentType );
912
- if ( contentType.startsWith ( " image/" ) )
912
+ if ( contentType.startsWith ( " image/" , Qt::CaseInsensitive ) )
913
913
{
914
914
QImage myLocalImage = QImage::fromData ( cacheReply->readAll () );
915
915
if ( !myLocalImage.isNull () )
@@ -925,7 +925,7 @@ void QgsWmsProvider::cacheReplyFinished()
925
925
else
926
926
{
927
927
QByteArray text = cacheReply->readAll ();
928
- if ( contentType == " text/xml" && parseServiceExceptionReportDom ( text ) )
928
+ if ( contentType. toLower () == " text/xml" && parseServiceExceptionReportDom ( text ) )
929
929
{
930
930
showMessageBox ( mErrorCaption , mError );
931
931
}
0 commit comments