Skip to content

Commit

Permalink
fix: add status_code 304 (#6000)
Browse files Browse the repository at this point in the history
Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com>
Co-authored-by: crazywoola <427733928@qq.com>
  • Loading branch information
3 people authored Jul 5, 2024
1 parent cddea83 commit af98fd2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/core/file/message_file_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def _check_image_remote_url(self, url):
}

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."
Expand Down

0 comments on commit af98fd2

Please sign in to comment.