You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Henry Kuijpers (Jira)" <ji...@apache.org> on 2021/12/22 12:43:00 UTC

[jira] [Created] (SLING-11032) @SlingServletFilter(extensions = "") not restricting filter matching to extensionless requests

Henry Kuijpers created SLING-11032:
--------------------------------------

             Summary: @SlingServletFilter(extensions = "") not restricting filter matching to extensionless requests
                 Key: SLING-11032
                 URL: https://issues.apache.org/jira/browse/SLING-11032
             Project: Sling
          Issue Type: Bug
            Reporter: Henry Kuijpers



{code:java}
@SlingServletFilter(
    extensions = ""
    pattern = "/bin/my-servlet",
    methods = HttpConstants.METHOD_POST
)
public class MyFilter implements Filter {

}
{code}

I would expect this code to evaluate to a filter that would only match a request that has path "/bin/my-servlet", no extension and method POST. Instead, all requests match (Sling Engine acts as if there was no extension constraint configured).

I specifically don't want this filter to be called when the request is "/bin/my-servlet.json" or /bin/my-servlet.xml" for example.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)