Uploaded image for project: 'FUSE Mediation Router'
  1. FUSE Mediation Router
  2. MR-703

Camel double encoding uri parameters

    XMLWordPrintable

Details

    Description

      Camel is double encoding uri parameters.

      The following route will demonstrate this issue:

      <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&amp;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>		
      

      Then use the following URL in a browser to to invoke the route:

      http://localhost:8281/jettyTestRouteA/path?param1=%2B447777111222
      

      This results in the parameter parm1 getting double 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
      

      Attachments

        Activity

          People

            cibsen@redhat.com Claus Ibsen
            rhn-support-jsherman Jason Sherman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: