-
Notifications
You must be signed in to change notification settings - Fork 38.5k
Regression issue with response encoding between Spring Boot 2.1.x and 2.2.x #24477
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
Comments
Using the attached project, I get no failures, all tests pass and the error is without the stack trace. Please, provide more details. |
For some reason my gradle instance is run with Thanks for looking into it. |
But... something has changed in Spring which causes the test to fail now. Why does it work for a boot 2.1.x project with |
The reasons are explained in #22788. Previously the response had a charset that forced the interpretation of the response. To comply with the RFC, the response now does not have a charset and clients must interpret it as UTF-8 by default. I don't know what in your test stack is responsible for decoding the response. That's why I was looking for a failing test. I still can't get it to fail. |
The problem was in rest-assured, spring-mock-mvc module. |
Uh oh!
There was an error while loading. Please reload this page.
Affects: Spring Boot 2.2.x
We have identified a regression issue while upgrading from Spring Boot 2.1.11 to Spring Boot 2.2.4.
In Spring 5.2.x
MediaType.APPLICATION_JSON_UTF8
has been deprecated. If we replaceproduces = APPLICATION_JSON_UTF8_VALUE
on endpoints withproduces = APPLICATION_JSON_VALUE
our contract tests fails with errorNo change has been made to the contract tests in the upgrade process.
This looks very much like #24123 but since we're already using Spring 5.2.3 that is already in place.
I have created a very basic test project which showcases the issue. You can find it here.
Are we missing some configuration? Is there another way to solve this in 2.2.x?
Please let me know if more information is needed.
The text was updated successfully, but these errors were encountered: