Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: support for etag with quotes in IfNoneMatch header #5715

Merged
merged 2 commits into from
Nov 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion moto/s3/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -1296,7 +1296,7 @@ def _key_response_get(self, bucket_name, query, key_name, headers):
if_modified_since = str_to_rfc_1123_datetime(if_modified_since)
if key.last_modified.replace(microsecond=0) <= if_modified_since:
return 304, response_headers, "Not Modified"
if if_none_match and key.etag == if_none_match:
if if_none_match and key.etag in [if_none_match, f'"{if_none_match}"']:
return 304, response_headers, "Not Modified"

if "acl" in query:
Expand Down