UrlEncoded Path Parameters received correctly in Fuse but sent out decoded
Issue
- In completely "vanilla" FuseESB (both 7.0.2 and 7.1) if you pass in a URL containing query parameters with values containing URI encoded characters, the characters become double encoded as they pass through the Camel route.
For example if the following route is used:
<route id="JettyTestRouteA">
<from uri="jetty:http://localhost:8281/jettyTestRouteA?matchOnUriPrefix=true"/>
<log message="Using JettyTestRouteA route: CamelHttpPath=[${header.CamelHttpPath}], CamelHttpUri=[${header.CamelHttpUri}]"/>
<to uri="jetty:http://localhost:8282/jettyTestRouteB?bridgeEndpoint=true&throwExceptionOnFailure=false"/>
</route>
<route id="JettyTestRouteB">
<from uri="jetty:http://localhost:8282/jettyTestRouteB?matchOnUriPrefix=true"/>
<log message="Using JettyTestRouteB route: CamelHttpPath=[${header.CamelHttpPath}], CamelHttpUri=[${header.CamelHttpUri}]"/>
</route>
If this route is then invoked using the following URL:
http://localhost:8281/jettyTestRouteA/path?param1=%2B447777111222
The parameter param1 becomes improperly encoded to %252B447777111222:
2013-03-13 22:19:07,453 | DEBUG | HttpClient-394 | JettyContentExchange | ? ? | 239 - org.apache.camel.camel-jetty - 2.10.0.fuse-71-047 | TaskComplete with state 7 for url: http//localhost:8282/jettyTestRouteB/path?param1=%252B447777111222
Environment
- Fuse ESB Enterprise 7.0.2
- Fuse ESB Enterprise 7.1
- Camel 2.9.0.fuse-70-097
- Camel 2.10.0.fuse-71-047
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
