QNetworkAccessManager and changing ApplicationProxy

Thiago Macieira thiago at macieira.org
Tue Nov 4 12:04:53 PST 2014


On Tuesday 04 November 2014 11:23:22 Dirk Hohndel wrote:
> Thiago,
> 
> silly question. I'm trying to figure out bug #752. Brief summary of that
> bug:
> 
> Proxy password not used by the app if changed on the fly
> - Proxy password has expired
> - You try to download GPS point and you get "authentication error"
> - You update the password and save new setting but the new password is not
>   used by the GPS download feature but it was correctly saved.
> - Restart the application, everything works.
> 
> When trying to debug this it seems to me that we are indeed correctly
> resetting the ApplicationProxy - but that doesn't appear to be used once
> applied. So I'm wondering if this has something to do with the fact that
> our QNetworkAccessManager was created before the change and is kept
> around...

I don't think so. The proxy configuration is queried for each request that is 
sent. I think the problem is the credential cache that QNAM holds.

> Is there a way to inform the QNetworkAccessManager of the change in proxy
> settings? Is that necessary? Am I missing something else that we need to
> do to apply the proxy settings at runtime without a restart? Am I barking
> up the completely wrong tree?

It looks like a regular Qt bug. I haven't looked at this code for a while and 
it's quite different now from when I wrote it in 2007. I'll need to debug this 
to figure out what it is.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358



More information about the subsurface mailing list