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

camel-http4: basic auth no longer working when used in combination with a dynamic to

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Reopened
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.22.0, 2.22.1, 2.23.2, 2.24.1
    • Fix Version/s: None
    • Component/s: camel-http4
    • Labels:
    • Estimated Complexity:
      Unknown

      Description

      After upgrading a Spring Boot Project from Camel 2.21.1 to Camel 2.22.0 basic authentication of the http4 component stopped working when it is used in combination with a dynamic to.

      My (slightly simplified) route:

      from(inUri)
          .setHeader(Exchange.CONTENT_TYPE, constant(MediaType.APPLICATION_JSON_VALUE))
          .setBody(constant("{\"action\":\"signal\"}"))
          .setHeader(Exchange.HTTP_METHOD, constant(HttpMethods.PUT))
          .toD("http4://{{username}}:{{password}}@{{host}}:{{port}}/executions/${exchangeProperty.my_id}");
      

      When I change the route and remove the dynamic to everything works fine again:

      from(inUri)
          .setHeader(Exchange.CONTENT_TYPE, constant(MediaType.APPLICATION_JSON_VALUE))
          .setBody(constant("{\"action\":\"signal\"}"))
          .setHeader(Exchange.HTTP_METHOD, constant(HttpMethods.PUT))
          .setHeader(Exchange.HTTP_PATH, exchangeProperty("my_id"))
          .to("http4://{{username}}:{{password}}@{{host}}:{{port}}/executions/");
      

      Maybe this regression was caused by CAMEL-12462?

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                pascalschumacher Pascal Schumacher
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated: