Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-354

ResourceHandler should have the option to call a "next" handler instead of 404 on missing resource

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Major
    • 1.2.0.Beta7
    • 1.1.0.Final, 1.1.1.Final, 1.2.0.Beta6
    • Core
    • None

    Description

      A ResourceHandler always must be the end of a handler chain because if it fails to find a resource it send an error on the exchange and closes it. It should allow another handler as fallback instead.

      This means that the ResourceManager might need a new method isExists() which can be called before switching to blocking mode. Therefore can chain to a fallback handler. Although I'm not sure all ResourceManagers would be blocking either, but in this case the chain should be able to happen before blocking is forced.

      A use case, we receive a list of separate directories to unify into one virtual directory, they are overlaid, so one might contain site ./scripts and ./css another might contain html files, and another might contain the contents of webjars ... and they all need to act as-if they were merged together. It is not possible now due to the forced 404 when the first resource manager fails.

      Attachments

        Activity

          People

            sdouglas1@redhat.com Stuart Douglas
            jaysonminard Jayson Minard (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: