fix: add status_code 304 (#6000)

Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com>
Co-authored-by: crazywoola <427733928@qq.com>
This commit is contained in:
opriuwohg 2024-07-05 21:10:33 +08:00 committed by GitHub
parent cddea83e65
commit af98fd29bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -186,7 +186,7 @@ class MessageFileParser:
}
response = requests.head(url, headers=headers, allow_redirects=True)
if response.status_code == 200:
if response.status_code in {200, 304}:
return True, ""
else:
return False, "URL does not exist."