'Stop Qt WebEngine retry after failed proxy authenticaton
I have a QWebEnginePage, where I connected the proxyAuthenticationRequired signal to an authenticator function:
void
CustomQWebEnginePage::proxyAuthenticator(const QUrl &requestUrl, QAuthenticator *authenticator, const QString &proxyHost)
{
authenticator->setUser(CustomQWebEnginePage::DEFAULT_PROXY_USER);
authenticator->setPassword(CustomQWebEnginePage::DEFAULT_PROXY_PASSWORD);
}
I have set up a squid proxy server with basic authentication to test it.
My problem is:
If the authentication fails (wrong user/password), QtWebEngine will repeatedly try to authenticate for a total of 32 times.
I did find in the documentation that proxy errors won't be reported, there will be no signals.
But is it possible to stop the retries? What is even doing it? Is it Qt? Is it Chromium?
I tried to track down the retry count 32 in Qt/Chromium/Squid, but no luck.
Ultimately, what I try to achieve is to be able to restrict the retries within QtWebEngine, like saying, after the first fail, stop trying to authenticate.
(Solving on the Squid side is not an option, as it is only a test proxy server, later I won't be able to control the proxy.)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
