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
Question - MultiPartUpload response content type #35
Comments
Interesting. Which request (or part of the multipart upload sequence) is causing the trouble? I can see that for some of those methods we don't have a Content-Type defined... Would be nice if you could help us sort this out. |
After further investigation, looks like it is failing on |
I tried changing
|
I've just ran into the same issue. The problem is that the S3Mock Server (not the client) returns a The official AWS S3 documentation (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html) unfortunately doesn't define a Content-Type for the response. It seems most clients ignore the Content-Type of the Response and just parse it as XML, that's why this issue isn't so common. Nevertheless I believe for the S3 Mock to be an HTTP wise correct and AWS wise accurate implementation, it should also return the I'd be happy to create a PR if others think the same way. |
hey @an-tex, very good analysis, helped me understanding the issue a lot better. |
I hoped for a feedback by the maintainers first if there's a reason for defining explicitly that content type. But seems that's not gonna happen ;) In the meantime I'm using https://github.com/gaul/s3proxy but would also rather switch back to this. |
@an-tex thanks for looking into it and finding the discrepancy. I think using the same content type as AWS does is the way to go. A PR would be very welcome! 👍 |
Thanks for the reply @agudian ! I'll make a PR next week. Cheers |
hey @an-tex, did you find any time to raise a PR for this? Might look into doing this myself if it's of any help... |
Hi @DanieleSassoli . I've made the changes locally just yesterday but some tests started failing. I'll look into it later, if it's something I could need assistance with I'll open a PR with the failing tests so we can continue together? Cheers |
alright the issue is when annotating an endpoint with: @RequestMapping(/*...*/ produces = {"application/octet-stream"}) the integration tests fail as the S3Mock returns a "400 - Bad Request" for most of the calls. This is the spring framework itself rejecting the request. I'm not sure why. Maybe it just doesn't know how to serialize the response? When I put |
I believe this should be closed following #198? |
yepp, you're right. |
Hello,
This is more of a question, I am trying to figure out where is the gap.
We are using
Scala
as programming language, for reading and writing to S3 we are usingAlpakka
, which provide us streaming.We are using multi part upload which works fine when directly using
Amazon S3
but when using againsS3Mock
we get following error:Unsupported Content-Type, supported: application/xml, application/octet-stream
We are also tried other S3 mock and it works fine as well.
Any idea what is going on?
Your response will be appreciated.
Regards,
Syed
The text was updated successfully, but these errors were encountered: