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
More Specific Response Content Type #198
Conversation
Thanks for the contribution, let me take a look. |
server/src/test/java/com/adobe/testing/s3mock/its/PlainHttpIT.java
Outdated
Show resolved
Hide resolved
server/src/test/java/com/adobe/testing/s3mock/its/PlainHttpIT.java
Outdated
Show resolved
Hide resolved
hey guys, any update on this? I can't really tell why the build is failing on travis, probably missing something. |
@DanieleSassoli Build is failing due to check-style violation https://travis-ci.org/adobe/S3Mock/builds/619544525#L575 |
Thanks for the hint @DanieleSassoli @ChaithanyaGK . I missed to follow up here. Just pushed the checkstyle changes incl. merge from upstream master |
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.
squash commits pls
…esponse content type to be more consistent with http and aws spec
I'll do a release on Monday |
|
Description
Some of the S3Mock endoints return a
application/x-www-form-urlencoded
Content-Type, which is ignored by most clients but is HTTP specification wise not correct. The AWS API spec doesn't explicitly describe the Content-Type, but the the actual response body is XML and the Content-Typeapplication/octet-stream
Some strict clients (e.g. Akka HTTP, Alpakka), correctly reject parsing a Content-Type of
application/x-www-form-urlencoded
as XML, but rather expectapplication/octet-stream
orapplication/xml
.I've tried changing the Content-Type to
application/octet-stream
, but the Spring Framework always returns a400 - Bad Request
then in the IT tests. I couldn't figure out why, but my guess is that it doesn't know that this response should be marshalled XML. Changing the Content-Type to returnapplication/xml
works on the other hand. Both, the IT tests and the Akka HTTP client are happy then. I know that's not ideal as it's not an accurate implementation of the S3 API, but I'd argue it is still more correct than the current implementation.Related Issue
#35
Tasks