[jboss-jira] [JBoss JIRA] (WFLY-8358) Wrong charset received in HttpServletRequest sent by POST method with JQUERY AJAX

Brian Stansberry (Jira) issues at jboss.org
Thu Jan 24 22:56:00 EST 2019


     [ https://issues.jboss.org/browse/WFLY-8358?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Stansberry reassigned WFLY-8358:
--------------------------------------

    Assignee: Flavia Rainone  (was: Jason Greene)


> Wrong charset received in HttpServletRequest sent by POST method with JQUERY AJAX
> ---------------------------------------------------------------------------------
>
>                 Key: WFLY-8358
>                 URL: https://issues.jboss.org/browse/WFLY-8358
>             Project: WildFly
>          Issue Type: Bug
>          Components: Web (Undertow)
>    Affects Versions: 10.1.0.Final
>         Environment: Tested in Windows 7 Enterprise and tested in Linux 3.16.6-2-desktop
>            Reporter: Mario García García
>            Assignee: Flavia Rainone
>            Priority: Major
>         Attachments: MiServlet.java, index.jsp
>
>
> Performing a typical AJAX call with JQUERY ($.ajax function) to a Servlet from a JSP with method POST and sending a parameter that contains a String with latin characters such as 'ó'.
> This is the String that is sent into a parameter:
> "Código"
> No content type specified so JQUERY.AJAX takes the default one (contentType: 'application/x-www-form-urlencoded, charset=UTF-8').
> The received parameter in HttpServletRequest (doPost method) is showed like this:
> "C??digo". 
> In Hex this is the content:
> 43 3f3f 6469676f (spaces added for better reading pourposes)
> This is not UTF-8. The proper encoding should be:
> 43 c3b3 6469676f (spaces added for better reading pourposes)
> Wildfly Configuration:
> Subsystems    Subsystem: Web/HTTP - Undertow    Settings: Servlet/JSP
> Default encoding: (empty)
> Java encoding: UTF8
> Subsystems    Subsystem: Web/HTTP - Undertow    Settings: HTTP
> Url charset: UTF-8



--
This message was sent by Atlassian Jira
(v7.12.1#712002)



More information about the jboss-jira mailing list