Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-10040

Different behavior when filter defined in undertow-handlers.conf vs via expression filter

    Details

    • Steps to Reproduce:
      Hide

      1. Deploy attached war.
      2. curl -v -X POST localhost:8080/files/empty — expected response code is 444, correct
      3. curl -v localhost:8080/files/empty — the expected response code is 555, but actual response code is 200 OK

      Show
      1. Deploy attached war. 2. curl -v -X POST localhost:8080/files/empty — expected response code is 444, correct 3. curl -v localhost:8080/files/empty — the expected response code is 555, but actual response code is 200 OK

      Description

      When this expression

      equals(%m, 'POST') -> { response-code(444) } else { response-code(555) }

      is put into "undertow-handlers.conf", and the predicate is false, the returned response code is 200, like the false branch was ignored.

      The handler for the false branch is set to RewriteCorrectingHandlerWrapper.

      This behavior is different when the same expression is configured via expression filter in undertow subsystem.

      Contents of files.war:

      /empty
      /not-empty
      /WEB-INF/undertow-handlers.conf
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                swd847 Stuart Douglas
                Reporter:
                adamkrajcik Adam Krajcik
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: