diff options
author | Cédric Cabessa <ccabessa@genymobile.com> | 2016-05-10 12:10:32 +0200 |
---|---|---|
committer | Cédric Cabessa <ccabessa@genymobile.com> | 2017-02-24 11:28:29 +0000 |
commit | f971a0d65cc4bc64dc61bdd2a4b659b382eb996f (patch) | |
tree | 7ef2864273fb9c784f1a4c7db0e1d1376e8c9cf9 /src/corelib/io/qfsfileengine_win.cpp | |
parent | 30b829a5a9cdcc16dcc7ef6a8a71489f9340a677 (diff) |
Fix proxy when changing only the password
QHttpThreadDelegate doesn't take into account the password to compute the
key of the networkconnection hash. So if only the password for a proxy has
changed, the wrong data gets used for the connection.
This patch simply adds proxy->password() to the key.
Here are the steps to reproduce the bug:
* Use an authentified proxy and provide the correct username but a wrong
password
```
QNetworkAccessManager networkAccessManager;
QNetworkProxy proxy(QNetworkProxy::HttpProxy, PROXY_HOST, PROXY_PORT,
"goodusername", "badpassword");
networkAccessManager.setProxy(proxy);
``
* As expected, the reply returns ProxyAuthenticationRequiredError
* Using the same QNetworkAccessManager, setup a new proxy with the
correct credential:
```
QNetworkProxy proxy(QNetworkProxy::HttpProxy, PROXY_HOST, PROXY_PORT,
"goodusername", "goodpassword");
networkAccessManager.setProxy(proxy);
```
* The reply still returns ProxyAuthenticationRequiredError
[ChangeLog][QtNetwork] Fix proxy-authentication issue, after a wrong password
has been used, when supplying the right password.
Change-Id: Id3b5a2ce71fda81780f3ef2568a73d0022b38815
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/corelib/io/qfsfileengine_win.cpp')
0 files changed, 0 insertions, 0 deletions