Details
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
For Gerrit Dashboard: QTBUG-18107 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
16470,2 | Fix handling of urls containing username/password in QNetworkAccessManager | master | qt/qtbase | Status: MERGED | +2 | 0 |
16753,1 | Fix handling of urls containing username/password in QNetworkAccessManager | 4.8 | qt/qt | Status: MERGED | +2 | 0 |