[Interest] QNetworkProxy auth support with QNetworkAccessManager
brian larochelle
larochelle.brian at gmail.com
Tue Sep 18 16:08:28 CEST 2012
Hello,
I posted this question to qt project forums, but figured I would get better
luck here. If posting in both places is bad form, let me know, and I will no
longer do so.
I'm using Qt 4.8.2 on embedded linux, I can reproduce with same version on
desktop linux.
I am subclassing QNetworkAccessManager to create a base class for all my
webservice communictions.
Everything works as expected, until i try to add proxy server support. It
works great without authentication, but a major problem comes up when I try to
add support for authentication. I’ve verified the proxy server with auth using
FireFox.
Attached is my code.
Proxy support gets configured in NetworkAccessManager::configureProxy(), then
the slot NetworkAccessManager::proxyAuthenticationRequired(…) gets called to
provide authentication.
The proxyAuthenticationRequired slot just gets called repeatedly.
And i just the something like the following over and over.
****
NetworkAccessManager::proxyAuthenticationRequired — called
NetworkAccessManager::proxyAuthenticationRequired requesting realm: proxy
QNetworkAccessCache::addEntry: overriding active cache entry ‘auth:proxy-
http://user@10.255.170.140:3128#proxy’
QNetworkAccessCache::addEntry: overriding active cache entry ‘auth:proxy-
http://user@10.255.170.140:3128’
QNetworkAccessCache::addEntry: overriding active cache entry ‘auth:proxy-
http://10.255.170.140:3128’
***
I’ve found the below related issue, but they did not lead helpful results.
https://bugreports.qt-project.org/browse/QTBUG-16728
https://bugreports.qt-project.org/browse/QTBUG-14850
I’ve also tried applying patches from here:
https://bugreports.qt-project.org/browse/QTBUG-15472
recompiled everything, still see the same results.
I Appreciate and guidance.
Thanks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: networkaccessmanager.cpp
Type: text/x-c++src
Size: 5152 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120918/30d4ee6d/attachment.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: networkaccessmanager.h
Type: text/x-chdr
Size: 1319 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120918/30d4ee6d/attachment.h>
More information about the Interest
mailing list