[
https://issues.apache.org/jira/browse/SLING-3006?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13815820#comment-13815820
]
Bertrand Delacretaz commented on SLING-3006:
--------------------------------------------
I have added two tests at http://svn.apache.org/r1539586 that demonstrate that
we don't get the results that you expect.
As the webconsole plugin does not check if the underlying resources actually
exist, it simply uses the first dot in the URL to separate between path and
selectors/extension.
We could improve that by having the plugin make an actual request, but I'm not
sure if that's a good idea. For now I have added the following warning on the
path field of the plugin's output:
bq. Note that in a real Sling request, the path might vary depending on the
existence of resources that partially match it. This utility does not take this
into account and uses the first dot to split between path and
selectors/extension.
I think that's acceptable for now, the workaround is to replace dots with _ for
example when testing such an URL. At least the behavior is now clearly
explained.
WDYT? Feel free to create a separate issue if you think this should be
addressed.
> SlingServletResolver webconsole plugin uses custom URL decomposition code
> that can be wrong
> -------------------------------------------------------------------------------------------
>
> Key: SLING-3006
> URL: https://issues.apache.org/jira/browse/SLING-3006
> Project: Sling
> Issue Type: Bug
> Components: Servlets
> Affects Versions: Servlets Resolver 2.2.4
> Reporter: Bertrand Delacretaz
> Assignee: Bertrand Delacretaz
> Priority: Minor
> Fix For: Servlets Resolver 2.2.6
>
>
> Entering
> http://localhost:8080/libs/foo/content/something/formitems.json/image/vnd/xnd/knd.xml
> in the /system/console/servletresolver webconsole plugin does not produce
> the correct results as per the testDotsAroundSuffix() at [1]
> This is due to the plugin using its own DecomposedURL class which is a
> simplified version of the SlingRequestPathInfo class.
> For now, I'll add a warning to the plugin.
> [1]
> http://svn.apache.org/repos/asf/sling/trunk/bundles/engine/src/test/java/org/apache/sling/engine/impl/request/SlingRequestPathInfoTest.java
--
This message was sent by Atlassian JIRA
(v6.1#6144)