Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-7999

OPTIONS Http request on REST resource returns incorrect content of Allow header

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Done
    • fuse-7.0
    • fuse-7.2
    • Camel
    • None
    • % %

    Description

      I have a REST resource which consumes multiple Http methods (for example GET, POST and PUT). If I send OPTIONS request to resource and I expect to receive Allow Http header with this content:

      Allow: GET,POST,PUT,OPTIONS

      That does not happen because I receive header which contains only two methods one of them is OPTIONS.

      Allow: GET,OPTIONS

      I have try multiple implementations and only camel-restlet works as I expect. These components contain bug:

      • camel-undertow
      • camel-servlet
      • camel-jetty
      • camel-netty4-http

      Reproducer: https://github.com/osmman/camel/commit/0411f070f75e5b0a26a4b9ea371824f648d9b508

      restConfiguration().component("undertow");
      rest("/v1/")
          .get("resource")
                .to("mock:options")
          .post("resource")
                .to("mock:options")
          .put("resource")
                .to("mock:options);
      

      Attachments

        Activity

          People

            cibsen@redhat.com Claus Ibsen
            tturek@redhat.com Tomas Turek
            Tomas Turek Tomas Turek
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: