-
Notifications
You must be signed in to change notification settings - Fork 181
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
S3Mock overwrites file data with ACL XML on 'putObject' #213
Comments
Thanks for the thorough report! I think adding a method that has a query parameter „acl“ defined should do the trick to route that call to that other method. Would you like to try adding that in a PR? |
I would love to, but I am swamped - I barely had enough time to diagnose this problem. Furthermore, I am not sure how the new method that handles it should behave:
|
Implement GetObjectACL / PutObjectACL Return / accept String instead of a POJO. We need to use JAX-B annotations instead of Jackson annotations because AWS decided to use xsi:type annotations in the XML representation, which are not supported by Jackson. It doesn't seem to be possible to use bot JAX-B and Jackson for (de-)serialization in parallel. fixes #213 / #290
Implement GetObjectACL / PutObjectACL Return / accept String instead of a POJO. We need to use JAX-B annotations instead of Jackson annotations because AWS decided to use xsi:type annotations in the XML representation, which are not supported by Jackson. It doesn't seem to be possible to use bot JAX-B and Jackson for (de-)serialization in parallel. fixes #213 / #290
Implement GetObjectACL / PutObjectACL Return / accept String instead of a POJO. We need to use JAX-B annotations instead of Jackson annotations because AWS decided to use xsi:type annotations in the XML representation, which are not supported by Jackson. It doesn't seem to be possible to use bot JAX-B and Jackson for (de-)serialization in parallel. fixes #213 / #290
Implement GetObjectACL / PutObjectACL Return / accept String instead of a POJO. We need to use JAX-B annotations instead of Jackson annotations because AWS decided to use xsi:type annotations in the XML representation, which are not supported by Jackson. It doesn't seem to be possible to use bot JAX-B and Jackson for (de-)serialization in parallel. fixes #213 / #290
Implement GetObjectACL / PutObjectACL Return / accept String instead of a POJO. We need to use JAX-B annotations instead of Jackson annotations because AWS decided to use xsi:type annotations in the XML representation, which are not supported by Jackson. It doesn't seem to be possible to use bot JAX-B and Jackson for (de-)serialization in parallel. fixes #213 / #290
Just released 2.7.0 which adds ObjectAcl support. |
First of all - great code - helps a lot with debugging S3 code locally.
While trying to use S3Browser with the mock as a server I encountered a problem with uploading files (which translates to calling the
FileStoreController#putObject
endpoint). After some debugging I found out the following:The application invokes
putObject
twice - once with file contents and once again with an XML that contains ACL data. The code does not distinguish between the 2 calls and thus overwrites the original file data with the ACL XML content.A quick analysis of the requests shows that there are some differences between the requests in the headers - which do not seem definitive enough to provide a distinction, However, there is one significant difference that seems to be most indicative that the call with the ACL contains an
acl
parameter (i.e.,PUT /some/path/to/bucket?acl
).For the time being I "patched" my code locally by checking if there is an
acl
parameter, and if so ignore the payload and return theS3Object
that was generated when the file data was uploaded. I do believe though that it should be handled somehow (perhaps the ACL is required somewhere else - I just did not encounter such a need).As a side-note - I looked for some documentation on this REST call but could not find any (I did not look very deep though due to lack of time...)
The text was updated successfully, but these errors were encountered: