Hi, Am Dienstag, den 13.05.2008, 11:39 +0200 schrieb Carsten Ziegeler: > Hi, > > while debugging SLING-445 I noticed that the RequestPathInfo object of > the NonExistingResource is not what I was expecting :) When invoking a > path with selectors and extensions and no resource could be found, the > path returned by RequestpathInfo is the full path (including possible > selectors and extensions) and extension and selectors are empty. > So if you invoke /a/b.html where neither /a/b.html nor /a/b exist, the > path returned is /a/b.html. > > We can argue that this behaviour is correct, as we don't know what the > selectors/extension is if we can't find a corresponding resource. I > don't know.
Yes, this is how I understand it: It could be possible, that a resource with the exact name exists in the repository. In this case the selectors and extensions would in fact be null and the path would be the full request path. In addition the request path could contain more strings, which would not be selectors and extensions either, depending on the underlying resource. For example a request path of /a/b.export.html/some/file.ext with resource /a/b would have the selector export, extension html and suffix /some/file.ext. I would opt to keep the NonExistingResource like this. Regards Felix