Hi,

Do people agree that all servlet registration parameters listed at
http://sling.apache.org/site/servlets.html should be ANDed?

If I register a servlet with

  sling.servlet.extensions" value="html"
  sling.servlet.resourceTypes" value="sling/servlet/default"
  sling.servlet.methods" value="GET"

It seems logical to imply "process only GET requests for the default
resource type, with an html extension".

Running some tests while looking at SLING-1069, this is not the case -
such a servlet will process requests for various combinations of the
registered method, extension and resource type, for example:

  HEAD request with an html extension (after disabling the SimpleWebdavServlet)
  GET request with a .json or .xyz extension.

This is due to the servlet being registered for these paths:

  /apps/sling/servlet/default/html.servlet (should that include GET to
be more precise, or is there some magic regarding GET?)
  /apps/sling/servlet/default/GET.servlet (looks wrong)

ANDing the servlet registration parameters would make more sense to me
- that's not backwards compatible though, so some existing apps might
need changes. But I think the current behavior is confusing.

-Bertrand

Reply via email to