Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-1231

Send 404/NOT FOUND if default GET servlet has no renderer for an extension

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Servlets Get 2.0.6
    • Servlets Get 2.0.8
    • Servlets
    • None

    Description

      The DefaultGetServlet currentls sends a 403/FORBIDDEN status if a request cannot be handled because there is no renderer for the requested extension. Likewise the StreamRendererServlet also sends a 403/FORBIDDEN if called with the wrong extension (only res and no extension are allowed).

      This contrasts to the situation when a non-existing resource is requested: Consider http://host/notfound.html. This results in a 404/NOT FOUND response. If requesting http://host/notfound.XYZ and there is no renderer for the XYZ extension, a 403/FORBIDDEN status is returned. This is unexpected.

      Additionally, not having a renderer for a certain extension means that the resource cannot be rendered which is practically the same as if the resource would not exist – rather than access to the resource is denied.

      Attachments

        Activity

          People

            bdelacretaz Bertrand Delacretaz
            fmeschbe Felix Meschberger
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: