cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-3764) JARS does not respect encoding when reading application/x-www-form-urlencoded;charset=Iso-8859-1 parameters
Date Mon, 29 Aug 2011 12:39:37 GMT

    [ https://issues.apache.org/jira/browse/CXF-3764?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13092811#comment-13092811
] 

Sergey Beryozkin commented on CXF-3764:
---------------------------------------

actually, seems to work for me.
Can you post please a sample form payload, they way it looks on the wire ?

I have this test:
http://svn.apache.org/repos/asf/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/FormEncodingProviderTest.java#testReadFromISO,



> JARS does not respect encoding when reading application/x-www-form-urlencoded;charset=Iso-8859-1
parameters
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-3764
>                 URL: https://issues.apache.org/jira/browse/CXF-3764
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.4.2
>            Reporter: Marc Giger
>
> JAXRS calls UrlUtils.urlDecode(value);
> which has hardcoded UTF-8 as encoding:
> public static String urlDecode(String value) {
>     try {
>         value = URLDecoder.decode(value, "UTF-8");
>     } catch (UnsupportedEncodingException e) {
>         LOG.warning("UTF-8 encoding can not be used to decode " + value);          
>     }
>     return value;
> }
>     
> I've provided the stack trace so that you can see which path it went through:
> java.lang.Exception: Stack trace
>         at java.lang.Thread.dumpStack(Thread.java:1206)
>         at org.apache.cxf.common.util.UrlUtils.urlDecode(UrlUtils.java:53)
>         at org.apache.cxf.jaxrs.utils.HttpUtils.urlDecode(HttpUtils.java:72)
>         at org.apache.cxf.jaxrs.utils.FormUtils.populateMapFromString(FormUtils.java:85)
>         at org.apache.cxf.jaxrs.utils.JAXRSUtils.processFormParam(JAXRSUtils.java:732)
>         at org.apache.cxf.jaxrs.utils.JAXRSUtils.createHttpParameterValue(JAXRSUtils.java:659)
>         at org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameter(JAXRSUtils.java:617)
>         at org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameters(JAXRSUtils.java:571)
>         at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:230)
>         at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:88)
>         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
>         at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:118)
>         at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:208)
>         at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
>         at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:166)
>         at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:113)
>         at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:184)
>         at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:107)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
>         at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:163)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message