fix: download some remote files raise error (#10781)

This commit is contained in:
非法操作 2024-11-19 21:18:53 +08:00 committed by GitHub
parent 6f4885d86d
commit 904ea05bf6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -45,7 +45,7 @@ class RemoteFileUploadApi(Resource):
resp = ssrf_proxy.head(url=url) resp = ssrf_proxy.head(url=url)
if resp.status_code != httpx.codes.OK: if resp.status_code != httpx.codes.OK:
resp = ssrf_proxy.get(url=url, timeout=3) resp = ssrf_proxy.get(url=url, timeout=3, follow_redirects=True)
resp.raise_for_status() resp.raise_for_status()
file_info = helpers.guess_file_info_from_response(resp) file_info = helpers.guess_file_info_from_response(resp)