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

QNetworkAccessManager::clearAccessCache() should be called after changing proxy setup...



    • Type: Suggestion
    • Status: Reported
    • Priority: Not Evaluated
    • Resolution: Unresolved
    • Affects Version/s: 5.2.1, 5.4.1
    • Fix Version/s: None
    • Labels:


      In a quite typical use case a user would have the opportunity to modify the proxy configuration for an application.

      Let's say that to reflect proxy configuration as entered by the user we're setting the proxy at application level by calling NetworkProxy::setApplicationProxy().

      Let's assume that the password which was specified with QNetworkProxy::setPassword() was a wrong one, so the connection is not working.

      The user fixes the configuration and we call again QNetworkProxy::setApplicationProxy() before the user activates the connection again. Everything works very well if the modified parameters are limited to host, port, or user, but a modification to the password also requires a call to QNetworkAccessManager::clearAccessCache(), otherwise the connection would still not work, because probably the password is cached during the first connection attempt.

      I think that it could be a good move to implicitly cause a QNetworkAccessManager::clearAccessCache() call when a proxy is configured with NetworkProxy::setApplicationProxy(). The password modification could be cheked before doing so, alternatively.

      That's a suggestion, because I think that doing that at the application level looks quite "ugly".

      I tested this behaviour with Qt 5.2.1, but as I did not see any report concerning this I'm assuming that the 5.4.1 release could show the same result.


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



            richmoore Richard Moore (qtnetwork)
            albert76 Albert
            1 Vote for this issue
            2 Start watching this issue



                Gerrit Reviews

                There are no open Gerrit changes