Clean up netrc support
This commit is contained in:
parent
b64eb8dfe6
commit
772f0025f1
@ -824,8 +824,7 @@ class WebEngineTab(browsertab.AbstractTab):
|
||||
# https://bugreports.qt.io/browse/QTBUG-61506
|
||||
self.search.clear()
|
||||
super()._on_load_started()
|
||||
if self.data.netrc_used:
|
||||
self.data.netrc_used = False
|
||||
self.data.netrc_used = False
|
||||
|
||||
@pyqtSlot(QWebEnginePage.RenderProcessTerminationStatus, int)
|
||||
def _on_render_process_terminated(self, status, exitcode):
|
||||
|
@ -270,11 +270,12 @@ class NetworkManager(QNetworkAccessManager):
|
||||
@pyqtSlot('QNetworkReply*', 'QAuthenticator*')
|
||||
def on_authentication_required(self, reply, authenticator):
|
||||
"""Called when a website needs authentication."""
|
||||
netrc = False
|
||||
netrc_success = False
|
||||
if not self.netrc_used:
|
||||
self.netrc_used = True
|
||||
netrc = shared.netrc_authentication(reply.url(), authenticator)
|
||||
if not netrc:
|
||||
netrc_success = shared.netrc_authentication(reply.url(),
|
||||
authenticator)
|
||||
if not netrc_success:
|
||||
abort_on = self._get_abort_signals(reply)
|
||||
shared.authentication_required(reply.url(), authenticator,
|
||||
abort_on=abort_on)
|
||||
|
@ -729,9 +729,7 @@ class WebKitTab(browsertab.AbstractTab):
|
||||
@pyqtSlot()
|
||||
def _on_load_started(self):
|
||||
super()._on_load_started()
|
||||
nam = self.networkaccessmanager()
|
||||
if nam.netrc_used:
|
||||
nam.netrc_used = False
|
||||
self.networkaccessmanager().netrc_used = False
|
||||
|
||||
@pyqtSlot()
|
||||
def _on_frame_load_finished(self):
|
||||
|
Loading…
Reference in New Issue
Block a user