-
Notifications
You must be signed in to change notification settings - Fork 82
Added x-amz-expiration
missing HTTP header in the response of object operations
#8958
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
base: master
Are you sure you want to change the base?
Conversation
4ffea5c
to
d5690b2
Compare
1e0964c
to
b0aadfc
Compare
PR is ready for review. For testing we can add ceph-s3 tests which are failing for missing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments and questions
Hi @achouhan09,
Note - same comment in AWS docs HeadObject and also in AWS docs PutObject Did you test in AWS the url-encoded part so we can understand what they do there? I also saw this comment:
@romayalon @nadavMiz just want you to notice, I think it is fine to implement it in NSFS, but I would like you to think about it. |
|
872cedd
to
60dbae9
Compare
src/test/system_tests/ceph_s3_tests/s3-tests-lists/nsfs_s3_tests_black_list.txt
Outdated
Show resolved
Hide resolved
since the documentation is not clear on this flag. I think it would also be good to check against aws if it exist for versioned objects as well. if it does it doesn't have to be in this PR, but at least we will open a gap for it |
b7cfd85
to
ffdf1fb
Compare
… GET/PUT/HEAD Signed-off-by: Aayush Chouhan <[email protected]>
Signed-off-by: Aayush Chouhan <[email protected]>
Signed-off-by: Aayush Chouhan <[email protected]>
Signed-off-by: Aayush Chouhan <[email protected]>
Signed-off-by: Aayush Chouhan <[email protected]>
Signed-off-by: Aayush Chouhan <[email protected]>
Signed-off-by: Aayush Chouhan <[email protected]>
Signed-off-by: Aayush Chouhan <[email protected]>
Describe the Problem
S3-compatible clients expect the
x-amz-expiration
response header when an object is subject to a lifecycle expiration rule. However, NooBaa was not setting this header in GET, PUT, or HEAD responses, even when valid expiration rules were configured.Explain the Changes
set_expiration_header()
function to include thex-amz-expiration
header in GET, PUT, and HEAD object responses.parse_expiration_header()
to convert lifecycle expiration rules (days or date) into proper s3 style header format.Below is the output for header of putObject, headObject and getObject (after the fix):
Issues: Fixed #xxx / Gap #xxx
start_time
to midnigt UTC (inside check_expiration_header() function) which is causing error and returning wrong no. of expiration days.Testing Instructions: