Skip to content
Permalink
Browse files

Merge pull request #42553 from gis-ops/nn_fix_http_error_response

Fill QgsNetworkReplyContent.content() on HTTP error
  • Loading branch information
m-kuhn authored and nyalldawson committed Mar 29, 2021
1 parent cd0bf03 commit 70eac1c97255ea31e3e5d57fc7cea721d080c8e8
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 70eac1c

Please sign in to comment.