-
Notifications
You must be signed in to change notification settings - Fork 150
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
Create bucket request sets "Expires" to zero #36
Comments
pisymbol
pushed a commit
to pisymbol/libs3
that referenced
this issue
Mar 22, 2016
The "Expires" field is not needed for a create bucket request and in fact, setting it to zero can cause some S3 implementations to fail the request because well, it has expired. Therefore, we set the "expires" S3PutParameter of the create bucket call to -1 in order to bypass generating this HTTP header entirely.
bji
added a commit
that referenced
this issue
Mar 22, 2016
Issue #36 - Expires header is set incorrectly
commit ad880cb |
trel
pushed a commit
to irods/libs3
that referenced
this issue
May 11, 2016
The "Expires" field is not needed for a create bucket request and in fact, setting it to zero can cause some S3 implementations to fail the request because well, it has expired. Therefore, we set the "expires" S3PutParameter of the create bucket call to -1 in order to bypass generating this HTTP header entirely.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Working with an ECS Single Node virtual machine, I discovered that my object user could delete buckets but not create them.
The cause I believe is because S3_create_bucket() sets expires to zero which sets the "Expires:" header to 1/1/70 and the ECS node barfs (request expired etc).
But more to the point:
http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUT.html
Doesn't include an "Expires" header nor is that part of the common request headers. Perhaps the S3PutProperties could be set to -1 which would avoid this non-sense all together.
diff --git a/src/bucket.c b/src/bucket.c
index c3f1126..1f3ba07 100644
--- a/src/bucket.c
+++ b/src/bucket.c
@@ -263,7 +263,7 @@ void S3_create_bucket(S3Protocol protocol, const char *accessKeyId,
0, // cacheControl
0, // contentDispositionFilename
0, // contentEncoding
etc.
That works.
The text was updated successfully, but these errors were encountered: