fix: send curl-like user agent to Gitea API
iperf3 static musl build / build-and-release (push) Successful in 19s

This commit is contained in:
Hermes Agent
2026-05-07 23:15:45 +00:00
parent 399dd8e7f3
commit 4fcf96342d
+1
View File
@@ -13,6 +13,7 @@ def api_request(method: str, url: str, token: str, data: bytes | None = None, he
req_headers = { req_headers = {
"Authorization": f"token {token}", "Authorization": f"token {token}",
"Accept": "application/json", "Accept": "application/json",
"User-Agent": "curl/8.10.1",
**(headers or {}), **(headers or {}),
} }
req = urllib.request.Request(url, data=data, headers=req_headers, method=method) req = urllib.request.Request(url, data=data, headers=req_headers, method=method)