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

Servlets registered with for resourceTypes = sling/servlet/default responds to all extensions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Servlets Resolver 2.0.4
    • Servlets Resolver 2.1.0
    • Servlets
    • None

    Description

      A servlet registered with
      @scr.property name="sling.servlet.extensions" value="html"
      @scr.property name="sling.servlet.resourceTypes" value="sling/servlet/default"
      in the Javadoc, responds to all requests, in effect ignoring the "sling.servlet.extensions" property.

      To reproduce:
      1. Install servlet from attachment (coming up)
      2. Let the browser fetch /somenode.json

      Expected result:
      The server returns the JSON rendering of /somenode

      Actual result:
      The server returns "Rogue Servlet"

      Attachments

        1. RogueServlet.java
          0.9 kB
          Vidar Skauge Ramdal
        2. SLING-1069.patch
          2 kB
          Vidar Skauge Ramdal
        3. SLING-1069-fmeschbe.patch
          2 kB
          Felix Meschberger
        4. SLING-1069-test.patch
          5 kB
          Bertrand Delacretaz

        Issue Links

          Activity

            People

              fmeschbe Felix Meschberger
              vramdal Vidar Skauge Ramdal
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: