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

QNetworkAccessManager: HTTP doesn't use Basic-Authentication from URL

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • P2: Important
    • 4.8.1, 5.0.0
    • 4.7.2, 4.7.3, 4.8.0
    • Network
    • None
    • any OS on any hardware

    • 0cd1a21f55863740c3c7b4f69a0d73f0089b03aa (4.8), b4a538ea1c3cdce09e3528227dba2e8f5765cbdc (5.0)

    Description

      Currently, when using QNetworkAccessManager to do a GET or POST request on QUrl("http://user:password@mydomain.ch/"), no authentication is done.

      Wouldn't it make sense for QNetworkAccessHttpBackend to use the authentication information in the URL to do HTTP Basic Authentication? e.g.

      if(!url.userName().isEmpty() || !url.password().isEmpty())
          req.setRawHeader("Authorization", "Basic " + QString(url.userName() + ":" + url.password()).toAscii().toBase64());
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            shkearns Shane Kearns
            bero Bernhard Rosenkränzer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes