Details
-
Bug
-
Resolution: Cannot Reproduce
-
P2: Important
-
None
-
4.7.3
-
None
-
Debian Squeeze 6.0.1 with Qt 4.7.3 from testing
Description
Steps to reproduce:
1) Set up Squid with authentication
2) Set a global proxy for your application pointing to that Squid with wrong credentials
3) QNetworkReply will return error #105 (QNetworkReply::ProxyAuthenticationRequiredError), which is ok
4) launch downloading again from the same QNetworkAccessManager instance
Result: Nothing happens, no signals, no errors, no data, nothing. If I strace my application, I will see that it constantly tries to connect to a web site and fails all the time. However QNetworkReply doesn't emit any signals. It seems that QNetworkAccessManager caches wrong credentials, and tries to use them. Source code is attached. Compile and run (with proper Squid address, of course). It will show something like
$ ./qt4-download Downloading http://security.debian.org/debian-security/pool/updates/main/i/iceweasel/iceweasel_3.5.16.orig.tar.bz2 slotResolve slotResolve got 0x8ffdf20 Progress 1486 1486 Data "<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html><head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>ERROR: Cache Access Denied</title> <style type="text/css"><!-- %l body :lang(fa) { direction: rtl; font-size: 100%; font-family: Tahoma, Roya, sans-serif; float: right; } :lang(he) { direction: rtl; float: right; } --></style> </head> <body> <div id="titles"> <h1>ERROR</h1> <h2>Cache Access Denied.</h2> </div> <hr> <div id="content"> <p>The following error was encountered while trying to retrieve the URL: <a href="http://security.debian.org/debian-security/pool/updates/main/i/iceweasel/iceweasel_3.5.16.orig.tar.bz2">http://security.debian.org/debian-security/pool/updates/main/i/iceweasel/iceweasel_3.5.16.orig.tar.bz2</a></p> <blockquote id="error"> <p><b>Cache Access Denied.</b></p> </blockquote> <p>Sorry, you are not currently allowed to request http://security.debian.org/debian-security/pool/updates/main/i/iceweasel/iceweasel_3.5.16.orig.tar.bz2 from this cache until you have authenticated yourself.</p> <p>Please contact the <a href="mailto:webmaster%W">cache administrator</a> if you have difficulties authenticating yourself or <a href="http://IPHONE/cgi-bin/chpasswd.cgi">change</a> your default password.</p> <br> </div> <hr> <div id="footer"> <p>Generated Wed, 14 Jul 2010 04:24:16 GMT by IPHONE (squid/2.7.STABLE7)</p> <!-- ERR_CACHE_ACCESS_DENIED --> </div> </body></html> " Done, error #105 <-- proxy error slotResolve <-- start again slotResolve got 0x9000680
<-- nothing happens, QNetworkReply constantly tries to download and silently fails over and over again
What I expect to see:
I expect "finished()" signal and QNetworkReply::error() set to QNetworkReply::ProxyAuthenticationRequiredError.