Skip to content
Permalink
Browse files

allow a failed QNetworkRequest to set a QgsNetworkReplyContent.conten…

…t() for custom server error messages
  • Loading branch information
nilsnolde committed Mar 29, 2021
1 parent 705259e commit 89a09b13c525791b6cdf55446aa54622046bd754
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/core/network/qgsblockingnetworkrequest.cpp
@@ -295,6 +295,7 @@ void QgsBlockingNetworkRequest::replyFinished()
{
if ( !mIsAborted && mReply )
{

if ( mReply->error() == QNetworkReply::NoError && ( !mFeedback || !mFeedback->isCanceled() ) )
{
QgsDebugMsgLevel( QStringLiteral( "reply OK" ), 2 );
@@ -408,6 +409,7 @@ void QgsBlockingNetworkRequest::replyFinished()
QgsMessageLog::logMessage( mErrorMessage, tr( "Network" ) );
}
mReplyContent = QgsNetworkReplyContent( mReply );
mReplyContent.setContent( mReply->readAll() );
}
}
if ( mTimedout )

0 comments on commit 89a09b1

Please sign in to comment.