You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I define a controller with a View response type and I set a specific content type and character encoding on the response object I expect these content type and character encoding to actually be applied to the rendered response.
Actual Behaviour
When I define a controller with a View response type and I set a specific content type and character encoding on the response object the actual rendered response contains default content type (text/html) and character encoding (UTF-8).
Steps To Reproduce
Clone the example application
Run mvn test
The following tests will fail:
testViewControllerReturnsDefinedMediaType
testViewControllerReturnsDefinedCharacterEncoding
The test testViewControllerEncodesCorrectCharacters will pass as the response content is interpreted as UTF-8
The tests testTextControlller... will pass as the ordinary controller works as expected
Expected Behavior
When I define a controller with a View response type and I set a specific content type and character encoding on the response object I expect these content type and character encoding to actually be applied to the rendered response.
Actual Behaviour
When I define a controller with a View response type and I set a specific content type and character encoding on the response object the actual rendered response contains default content type (text/html) and character encoding (UTF-8).
Steps To Reproduce
testViewControllerReturnsDefinedMediaType
testViewControllerReturnsDefinedCharacterEncoding
testViewControllerEncodesCorrectCharacters
will pass as the response content is interpreted as UTF-8testTextControlller...
will pass as the ordinary controller works as expectedEnvironment Information
Java 17
Example Application
https://github.com/bivapa/micronaut-view-char-encoding-bug-report
Version
4.6.3
The text was updated successfully, but these errors were encountered: