cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc Giger (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CXF-3764) JARS does not respect encoding when reading application/x-www-form-urlencoded;charset=Iso-8859-1 parameters
Date Fri, 26 Aug 2011 10:26:29 GMT
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