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

Wrong rest mapping on camel-undertow

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2.0
    • Component/s: camel-undertow
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      The order in which routes are declared changes the behavior of the integration.

       

      E.g.

      rest()
        .get("/{pippo}")
        .route()
        .setBody().simple("Route with name: ${header.pippo}")
        .setHeader("Content-Type", constant("text/plain"));
      
      
      rest()
        .get("/")
        .route()
        .setBody().constant("Route without name")
        .setHeader("Content-Type", constant("text/plain"));
      

      When calling it with:

      curl http://service:8080/
      

      The first route replies ("Route with name: ..."), but the second was supposed to.

      This same example works with jetty and netty-http.

      As workaround for undertow, if the order of the two routes is reversed, it works correctly.
      But when you create a route from a given openapi.json file, the order is given and you're not supposed to change it.

        Attachments

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              nferraro Nicola Ferraro
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: