in src/main/java/org/apache/sling/api/servlets/SlingJakartaSafeMethodsServlet.java [257:280]
protected boolean mayService(
@NotNull SlingJakartaHttpServletRequest request, @NotNull SlingJakartaHttpServletResponse 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;
}