Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 github-actions[bot] committed Mar 29, 2021
1 parent 1d16290 commit ac398bb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/network/qgsblockingnetworkrequest.cpp
Expand Up @@ -295,6 +295,7 @@ void QgsBlockingNetworkRequest::replyFinished()
{
if ( !mIsAborted && mReply )
{

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

0 comments on commit ac398bb

Please sign in to comment.