Skip to content

Commit c674bc8

Browse files
authored
Fix unnecessary full file download when checking URL authorization (#320)
1 parent 4de0975 commit c674bc8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

comfy_cli/file_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def check_unauthorized(url: str, headers: Optional[dict] = None) -> bool:
5555
bool: True if the response status code is 401, False otherwise.
5656
"""
5757
try:
58-
response = requests.get(url, headers=headers, allow_redirects=True)
58+
response = requests.get(url, headers=headers, allow_redirects=True, stream=True)
5959
return response.status_code == 401
6060
except requests.RequestException:
6161
# If there's an error making the request, we can't determine if it's unauthorized

0 commit comments

Comments
 (0)