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*')
|
||||
def _on_authentication_required(self, url, authenticator):
|
||||
netrc = None
|
||||
if not self.data.netrc_used and 'HOME' in os.environ:
|
||||
if not self.data.netrc_used:
|
||||
self.data.netrc_used = True
|
||||
netrc = shared.netrc_authentication(url, authenticator)
|
||||
if not netrc:
|
||||
|
@ -269,8 +269,8 @@ class NetworkManager(QNetworkAccessManager):
|
||||
def on_authentication_required(self, reply, authenticator):
|
||||
"""Called when a website needs authentication."""
|
||||
netrc = False
|
||||
if not hasattr(reply, "netrc_used"):
|
||||
setattr(reply, "netrc_used", True)
|
||||
if not self.data.netrc_used:
|
||||
self.data.netrc_used = True
|
||||
netrc = shared.netrc_authentication(reply.url(), authenticator)
|
||||
if not netrc:
|
||||
abort_on = self._get_abort_signals(reply)
|
||||
|
Loading…
Reference in New Issue
Block a user