Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-9660

HTTP producers crash when Exchange.HTTP_URI header contains unencoded unsafe characters

    XMLWordPrintableJSON

Details

    • Unknown

    Description

      For instance,

      template.sendBodyAndHeader("jetty:http://localhost:9000/test?bridgeEndpoint=true", "Hello World", Exchange.HTTP_URI, "/<>{}");
      

      this test code crashes with the following error:

      java.net.URISyntaxException: Illegal character in path at index 1: /<>{}
      

      It is because there are places in the HTTP producers code where they are trying to create a java.net.URI instance based on the unsafe string "/<>{}".

      This issue causes practical problems when bridging between Netty HTTP consumer endpoints and those HTTP producer endpoints, since Netty consumers route IN messages with Exchange.HTTP_URI header being unencoded.

      Attachments

        Issue Links

          Activity

            People

              davsclaus Claus Ibsen
              tadayosi Tadayoshi Sato
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: