[
https://issues.apache.org/jira/browse/WW-2361?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Lukasz Lenart updated WW-2361:
------------------------------
Fix Version/s: (was: 2.2.x)
3.x
> the default request charEncoding always used.
> ---------------------------------------------
>
> Key: WW-2361
> URL: https://issues.apache.org/jira/browse/WW-2361
> Project: Struts 2
> Issue Type: Improvement
> Affects Versions: 2.0.11
> Reporter: Avatar Zhang
> Fix For: 3.x
>
>
> // SUGGESTION
> Index: Dispatcher.java
> ===================================================================
> --- Dispatcher.java (revision 602010)
> +++ Dispatcher.java (working copy)
> @@ -620,10 +620,16 @@
> }
>
> if (encoding != null) {
> - try {
> - request.setCharacterEncoding(encoding);
> - } catch (Exception e) {
> - LOG.error("Error setting character encoding to '" + encoding
> + "' - ignoring.", e);
> + String encoding2 = request.getCharacterEncoding();
> + if (encoding2 == null) {
> + try {
> + request.setCharacterEncoding(encoding);
> + LOG.info("Set Character Encoding to " + encoding + "!");
> + } catch (Exception e) {
> + LOG.error("Error setting character encoding to '" +
> encoding + "' - ignoring.", e);
> + }
> + } else {
> + LOG.info("Character Encoding is " + encoding2 + ".");
> }
> }
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira