Hi, Felix Meschberger schrieb: > Hi Rory, > > Rory Douglas schrieb: >> I have a node at path /sample/content/test, with a child node /entries. >> "entries" has a sling:resourceType="test/EntryList", but there is no >> script registered for that resourceType. >> >> If I browse to http://localhost:8888/sample/content/test/entries >> (i.e no selectors or extension), I get redirected to >> http://localhost:8888/sample/test/entries/ >> >> I realize some work has gone on recently with directory listing and >> resource resolution, but is this supposed to happen? > > Yes. > > The reason for this is, that the StreamRendererServlet issuing the > Redirect (status 302/FOUND) calls the ResourceResolver.map() method on > the resource path. This causes the path /content/test/entries to be > mapped to /test/entries. > > When the URL us the requested, the path /test/entries is resolved to > /content/test/entries again giving you full round-tripping. > > I think, for the sake of symmetry, the redirect should be sent on the > mapped path, since on request the url is resolved. > > Of course, this may be a matter of taste of some kind and may certainly > be discussed.
After reconsidering this, I might be wrong ;-) Maybe the redirect should actually be simply to request.getContextPath() + request.getRequestURL() + "/" instead of ResourceResolver.map()-ping the resource. Regards Felix > >> The ResourceResolver mapping property is set to /content/- (a default >> value), which I had interpreted to mean URLs prefixed with /content, not >> all URLs containing /content. The checkbox next to >> "resource.resolver.new.name" is checked, but like the problem with the >> SlingAuthenticator allow-anonymous-access config, I'm unable to uncheck it. > > This may well be caused by the need to upgrade the Apache Felix Metatype > Service implementation bundle (see your other thread on Metatype > information). > > Hope this helps. > > Regards > Felix >
