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

io.undertow.servlet.handlers.DefaultServlet will list incorrect directory contents

    XMLWordPrintable

Details

    Description

      The Untertow DefaultServlet exhibits some odd behaviour when it has been mapped to a subdirectory.

      To see this behaviour, build the WAR file from the sample project at https://github.com/mcasperson/wildfly-default-servlet-bug. Deploy to WildFly 10 CR5, and open the link http://localhost:8080/wildfly-default-servlet-bug/static (note no slash on the end of the URL). You'll see the expected directory listing.

      Now open http://localhost:8080/wildfly-default-servlet-bug/static/ (note the slash on the end). You'll actually now be browsing the root directory of the application.

      Now open http://localhost:8080/wildfly-default-servlet-bug/static/static/data.xml (note the double static in the URL). You'll be able to open the XML file. This is not what I would have expected.

      Now open http://localhost:8080/wildfly-default-servlet-bug/static/data.xml. You'll get a 404. I would have expected to be able to open the file using this URL.

      Attachments

        Activity

          People

            sdouglas1@redhat.com Stuart Douglas
            mcasperson Matthew Casperson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: