cziegeler commented on code in PR #40: URL: https://github.com/apache/sling-org-apache-sling-engine/pull/40#discussion_r1387629421
########## src/main/java/org/apache/sling/engine/impl/request/RequestData.java: ########## @@ -507,7 +507,12 @@ public static void service(SlingHttpServletRequest request, SlingHttpServletResponse response) throws IOException, ServletException { - if (!isValidRequest(request.getRequestPathInfo().getResourcePath(), request.getRequestPathInfo().getSelectors())) { + final String selectorString = request.getRequestPathInfo().getSelectorString(); + String[] selectors = selectorString == null ? + getRawSelectors(request.getResource().getResourceMetadata().getResolutionPathInfo()) + : request.getRequestPathInfo().getSelectors(); + + if (!isValidRequest(request.getRequestPathInfo().getResourcePath(), selectors)) { Review Comment: This looks good. How about moving this code into isValidRequest and only pass the RequestPathInfo into that method (I think you can replace request.getResource()...getResolutionPathInfo() with RequestPathInfo.getResourcePath()) ? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org