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

[v2] S3 expires timestamp port #8935

Open
wants to merge 1 commit into
base: v2
Choose a base branch
from

Conversation

aemous
Copy link
Contributor

@aemous aemous commented Sep 20, 2024

Issue #, if available:

Description of changes:
Ported boto/botocore#3232 from botocore, which gracefully handles invalid expires timestamps from S3.

Testing:
In addition to passing existing and newly added tests for this functionality, I did manual testing to verify the new field is included in the response body of the GetObject operation. Below is an example manual test using the command aws s3api get-object --bucket bucketname --key filename outfile:

}
    "AcceptRanges": "bytes",
    "LastModified": "2024-09-20T18:56:59+00:00",
    "ContentLength": 23230,
    "ETag": "\"207d91b3fd7953aac7b28b8ddf882953\"",
    "ContentType": "binary/octet-stream",
    "Expires": "2025-09-20T07:28:00+00:00",
    "ServerSideEncryption": "AES256",
    "Metadata": {},
    "ExpiresString": "Sat, 20 Sep 2025 07:28:00 GMT"
}

This can be compared to the output of the exact same command using the current latest release:

{
    "AcceptRanges": "bytes",
    "LastModified": "2024-09-20T18:56:59+00:00",
    "ContentLength": 23230,
    "ETag": "\"207d91b3fd7953aac7b28b8ddf882953\"",
    "ContentType": "binary/octet-stream",
    "Expires": "2025-09-20T07:28:00+00:00",
    "ServerSideEncryption": "AES256",
    "Metadata": {}
}

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant