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

Camel REST does not handle same path with differents VERBS

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.14.0
    • 2.14.1, 2.15.0
    • camel-core
    • None
    • ALL

    • Moderate

    Description

      If we had the same path with different verbs (GET, POST, DELETE) only one is randomly choosen.

      To reproduce this issue i just changed the route builder in camel-example-servlet-rest-tomcat.

      In UserRouteBuilder.java change the last statement of configure() method with :

      rest("/user").description("User rest service")
      .consumes("application/json").produces("application/json")
      .get("/name").description("GET").outTypeList(User.class)
      .to("bean:userService?method=listUsers")
      .post("/name").description("POST").to("bean:userService?method=listUsers")
      .delete("/

      {name}

      ").description("DELETE").to("bean:userService?method=listUsers")
      ;

      After a quick debug it seams that the CamelServlet is fiiling a map of HttpConsumer. The key is path so only last one can be used further.

      Attachments

        Issue Links

          Activity

            People

              njiang Willem Jiang
              padewitte Pierre-Alban DEWITTE
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: