-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Labels
Description
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
- Clone the example application
- Run mvn test
- The following tests will fail:
testViewControllerReturnsDefinedMediaTypetestViewControllerReturnsDefinedCharacterEncoding
- The test
testViewControllerEncodesCorrectCharacterswill pass as the response content is interpreted as UTF-8 - The tests
testTextControlller...will pass as the ordinary controller works as expected
Environment Information
Java 17
Example Application
https://github.com/bivapa/micronaut-view-char-encoding-bug-report
Version
4.6.3