might as well use the same loop prevention mechanism for both backends
This commit is contained in:
parent
a2ca59b822
commit
9e258a490e
@ -741,7 +741,7 @@ class WebEngineTab(browsertab.AbstractTab):
|
|||||||
@pyqtSlot(QUrl, 'QAuthenticator*')
|
@pyqtSlot(QUrl, 'QAuthenticator*')
|
||||||
def _on_authentication_required(self, url, authenticator):
|
def _on_authentication_required(self, url, authenticator):
|
||||||
netrc = None
|
netrc = None
|
||||||
if not self.data.netrc_used and 'HOME' in os.environ:
|
if not self.data.netrc_used:
|
||||||
self.data.netrc_used = True
|
self.data.netrc_used = True
|
||||||
netrc = shared.netrc_authentication(url, authenticator)
|
netrc = shared.netrc_authentication(url, authenticator)
|
||||||
if not netrc:
|
if not netrc:
|
||||||
|
@ -269,8 +269,8 @@ class NetworkManager(QNetworkAccessManager):
|
|||||||
def on_authentication_required(self, reply, authenticator):
|
def on_authentication_required(self, reply, authenticator):
|
||||||
"""Called when a website needs authentication."""
|
"""Called when a website needs authentication."""
|
||||||
netrc = False
|
netrc = False
|
||||||
if not hasattr(reply, "netrc_used"):
|
if not self.data.netrc_used:
|
||||||
setattr(reply, "netrc_used", True)
|
self.data.netrc_used = True
|
||||||
netrc = shared.netrc_authentication(reply.url(), authenticator)
|
netrc = shared.netrc_authentication(reply.url(), authenticator)
|
||||||
if not netrc:
|
if not netrc:
|
||||||
abort_on = self._get_abort_signals(reply)
|
abort_on = self._get_abort_signals(reply)
|
||||||
|
Loading…
Reference in New Issue
Block a user