in src/main/java/org/apache/sling/api/servlets/SlingSafeMethodsServlet.java [255:278]
protected boolean mayService(@NotNull SlingHttpServletRequest request,
@NotNull SlingHttpServletResponse response) throws ServletException,
IOException {
// assume the method is known for now
boolean methodKnown = true;
String method = request.getMethod();
if (HttpConstants.METHOD_HEAD.equals(method)) {
doHead(request, response);
} else if (HttpConstants.METHOD_GET.equals(method)) {
doGet(request, response);
} else if (HttpConstants.METHOD_OPTIONS.equals(method)) {
doOptions(request, response);
} else if (HttpConstants.METHOD_TRACE.equals(method)) {
doTrace(request, response);
} else {
// actually we do not know the method
methodKnown = false;
}
// return whether we actually knew the request method or not
return methodKnown;
}