Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
None
-
5.15.2
-
None
Description
Hi.
We are using QNetworkAccessManager to make some http get requests and there seems to be a problem with proxy authentication. It happens when you are blocking slot connected to QNetworkAccessManager::proxyAuthenticationRequired signal for a long time (about 5 minutes or more).
After returning from proxyAuthenticationRequired connected slot application will hit assertion in QHttpNetworkConnectionChannel::sendRequest():
Q_ASSERT(!protocolHandler.isNull());
How to reproduce
The attached archive contains a simple testcase to reproduce the issue. You need to provide a valid proxy hostname (just change the proxyHostName variable) and port (proxyPort variable). The proxy server must require authentication.
Some remarks
- At this moment i can check only by using our Squid proxy server. I also try to use Fiddler with enabled authentication, but could not reproduce the issue. So its possible that some proxy server timeouts matter.
- It seems there is no need to input real credentials, it will hit assertion anyway.
- There are no difference between 5 minutes wait with repetitive QCoreApplication::processEvents() calls and one long QThread::sleep() without it.
QTBUG-47822can be somehow related to this issue- If you abort (QNetworkReply::abort) the current QNetworkReply inside slot connected to proxyAuthenticationRequired signal, there will not be any assertion hit.