Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-121515

[Reg 6.6.1 -> 6.6.2] QNetworkAccessManager never finishes request if server sends status code 401 without a challenge

    XMLWordPrintable

Details

    • macOS
    • ffe0271a2 (dev), d5cdfe33a (6.7), 394114e64 (6.6), 41aaf3384 (tqtc/lts-6.5), f4457ba91 (6.6.2), cbcbe83a5 (tqtc/lts-6.2)

    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 --- 

       

      Attachments

        1. CMakeLists.txt
          0.3 kB
          Joachim Grill
        2. main.cpp
          4 kB
          Joachim Grill
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            manordheim Mårten Nordheim
            jgrill Joachim Grill
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews