Thanks for the confirmation. Filed https://issues.apache.org/jira/browse/SLING-6947
Robert On Fri, 2017-06-09 at 13:18 +0200, Carsten Ziegeler wrote: > Not sure how you test, but it sounds like a bug in the test > code/library. > > Regards > Carsten > > Robert Munteanu wrote > > Hi, > > > > I'm working on a path-bound servlet for testing purposes and want > > to > > write a test using the Sling mocks. I am using the request path > > info as > > a control to check what action is requested. > > > > The servlet is bound to "/system/sling/testing/email", and I want > > to > > use > > > > "/system/sling/testing/email/config" as an action for requesting > > the > > configuration and "/system/sling/testing/email/messages" for > > getting a > > list of messages. > > > > In my code I am asking for the HttpServletRequest.getPathInfo(), > > which > > returns everything after the bind path. > > > > In the test the pathInfo implementation [1] returns the whole > > request > > path. I can short-circuit the logic, but my questions are: > > > > 1) is this intended or a bug? > > 2) is there another way of getting the path info for path-bound > > servlets? > > > > Thanks, > > > > Robert > > > > > > [1]: org.apache.sling.servlethelpers.getPathInfo > > > > > >