Add HTTP method to response timeout slot. Ref #3810

This commit is contained in:
grossmj
2026-04-06 22:34:05 +08:00
parent cd7e9221fd
commit da9c36f476

View File

@@ -636,7 +636,8 @@ class HTTPClient(QtCore.QObject):
# We check if we received HTTP headers
if not sip.isdeleted(response) and response.isRunning() and not len(response.rawHeaderList()) > 0:
if not response.error() != QtNetwork.QNetworkReply.NetworkError.NoError:
log.warning("Timeout after {} seconds for request {}. Please check the connection is not blocked by a firewall or an anti-virus.".format(timeout, response.url().toString()))
method = response.request().attribute(QtNetwork.QNetworkRequest.Attribute.CustomVerbAttribute).data().decode()
log.warning("Timeout after {} seconds for request {} '{}'. Please check the connection is not blocked by a firewall or an anti-virus.".format(timeout, method, response.url().toString()))
response.abort()
def disconnect(self):