Details
Description
With Qt 6.6.2 (branch, qtbase a619b6dd41) a QNetworkAccessManager::post() request does not terminate if the server returns status code 401 (unauthorized) without a challenge.
Output of the attached test application:
emitted signals: QNetworkReply::socketStartedConnecting QNetworkAccessManager::encrypted QNetworkReply::encrypted QNetworkReply::requestSent QNetworkReply::uploadProgress 5 / 5 QNetworkReply::metaDataChanged
With Qt 6.6.1 everything works as expected:
emitted signals:
QNetworkReply::socketStartedConnecting
QNetworkAccessManager::encrypted
QNetworkReply::encrypted
QNetworkReply::requestSent
QNetworkReply::uploadProgress 5 / 5
QNetworkReply::metaDataChanged
QNetworkReply::downloadProgress 12 / -1
QNetworkReply::errorOccurred QNetworkReply::AuthenticationRequiredError
QNetworkReply::downloadProgress 12 / 12
QNetworkReply::uploadProgress 0 / 0
QNetworkAccessManager::finished
finished QNetworkReply::AuthenticationRequiredError "Error transferring https://www.codeandweb.com/api/simulate-error?code=401 - server replied: "
--- app terminated ---