Align integration contract and image generation validation

This commit is contained in:
Pigway
2026-10-10 01:25:32 +08:00
parent b9b33b83bb
commit 4acd616555
5 changed files with 23 additions and 11 deletions
+3 -2
View File
@@ -161,6 +161,7 @@ class Assets:
body=None,
limit=None,
accepted_status=(200,),
timeout=10,
):
limit = limit or self.settings.max_bytes
parsed = urlsplit(url)
@@ -193,12 +194,12 @@ class Assets:
class PinnedHTTPS(http.client.HTTPSConnection):
def connect(self):
sock = socket.create_connection((ip, 443), timeout=10)
sock = socket.create_connection((ip, 443), timeout=timeout)
self.sock = ssl.create_default_context().wrap_socket(
sock, server_hostname=parsed.hostname
)
connection = PinnedHTTPS(parsed.hostname, timeout=10)
connection = PinnedHTTPS(parsed.hostname, timeout=timeout)
try:
connection.request(
method,