-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Set URI encoding for embedded containers to UTF-8 #540
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
This commit introduces an extra 'server.tomcat.uri-encoding' property used to configure the URI encoding for the embedded tomcat container. This defaults to 'UTF-8' instead of what tomcat uses by default (i.e. 'ISO-8859-1'). Note that Jetty uses 'UTF-8' by default but can only be customized through the use of a system property so this new setting only applies for Tomcat. Fixes spring-projectsgh-540
This commit introduces an extra 'server.tomcat.uri-encoding' property used to configure the URI encoding for the embedded tomcat container. This defaults to 'UTF-8' instead of what tomcat uses by default (i.e. 'ISO-8859-1'). Note that Jetty uses 'UTF-8' by default but can only be customized through the use of a system property so this new setting only applies for Tomcat. Fixes spring-projectsgh-540
* gh-540: Support Tomcat uri encoding (with UTF-8 default)
👍 |
Introduce an extra `server.tomcat.uri-encoding` property used to configure the URI encoding for the embedded tomcat container. Defaults to `UTF-8` instead of the usual tomcat default of `ISO-8859-1`. Fixes spring-projectsgh-540
Introduce an extra `server.tomcat.uri-encoding` property used to configure the URI encoding for the embedded tomcat container. Defaults to `UTF-8` instead of the usual tomcat default of `ISO-8859-1`. Fixes spring-projectsgh-540
…-540 * spring-projectsgh-540: Support Tomcat uri encoding (with UTF-8 default)
I don' want to open another issue for this same case, since this one has been closed ans @snicoll proposal at #542 was supposed to fix this issue. I'm experiencing the exact same issue using SB 1.0.2.RELEASE with a simple dummy project. Project has Messages submitted through basic form
are facing this encoding issue, despite Tomcat's default encoding UTF-8 provided in this thread. Thymeleaf's template and HTML page encoding are UTF-8 too. This could be fixed by adding
to application, witch makes me think that server encoding still doesn't match default. Using Am I missing something? |
What this commit does is changing the way Tomcat parse URIs. If you have a form with a body, it's a different matter and you should specify it in your request. There are a couple of issues that are somewhat related to this. A request to change the default in Spring from Both are currently scheduled for the next release but if you don't want to set the body encoding or if you want to enforce |
Thanks for the clarification! |
Introduce an extra `server.tomcat.uri-encoding` property used to configure the URI encoding for the embedded tomcat container. Defaults to `UTF-8` instead of the usual tomcat default of `ISO-8859-1`. Fixes spring-projectsgh-540
append the following property in
hope it helps |
Please set the default encoding for the embedded containers to UTF-8. Otherwise there are issues with extracting characters like german umlauts from the uri for example when using the @RequestParam annotation. Currently i have to register my own connector customizer:
The text was updated successfully, but these errors were encountered: