[ https://issues.apache.org/jira/browse/SLING-11749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17678162#comment-17678162 ]
Sagar Miglani commented on SLING-11749: --------------------------------------- [~reschke] I also checked the map entries generated in different scenarios of url base vanity paths. Not sure map entries are generated correctly in all scenarios (like port -1 when no port in a url or in case example.com/vanityPath) but adding here thinking it might help :) ||sling:vanityPath||Map entries||Vanity Path target|| |http://example.com|^http/example.com.-1(\..*) and ^http/example.com.-1$|""| |http://example.com/|^http/example.com.-1/(\..*) and ^http/example.com.-1/$|"/"| |http://example.com:4502|^http/example.com.4502(\..*) and ^http/example.com.4502$|""| |http://example.com:4502/|^http/example.com.4502/(\..*) and ^http/example.com.4502/$|"/"| |://example.com:4502/vanityPath|None|None| |http://example.com/mock/vanityPath|^http/example.com.-1/mock/vanityPath(\..*) and ^http/example.com.-1/mock/vanityPath$|"/mock/vanityPath"| |http://example.com/mock/vanityPath/|^http/example.com.-1/mock/vanityPath/(\..*) and ^http/example.com.-1/mock/vanityPath/$|"/mock/vanityPath/"| |http://example.com:4502/vanityPath|^http/example.com.4502/vanityPath(\..*) and ^http/example.com.4502/vanityPath$|"/vanityPath"| |http://:4502/vanityPath|^http/.4502/vanityPath(\..*) and ^http/.4502/vanityPath$|"/vanityPath"| |example.com/vanityPath|^[^/]{+}/[^/]{+}/example.com/vanityPath(\..*) and ^[^/]{+}/[^/]{+}/example.com/vanityPath$|"/example.com/vanityPath"| |example.com:4502/vanityPath|^[^/]{+}/[^/]{+}/example.com:4502/vanityPath(\..*) and ^[^/]{+}/[^/]{+}/example.com:4502/vanityPath$|"/example.com:4502/vanityPath"| > resource resolver: document URL patterns in vanity paths and add test coverage > ------------------------------------------------------------------------------ > > Key: SLING-11749 > URL: https://issues.apache.org/jira/browse/SLING-11749 > Project: Sling > Issue Type: Task > Components: ResourceResolver > Reporter: Julian Reschke > Priority: Major > > MapEntries (in "private String[] getVanityPathDefinition(final String > pVanityPath)") currently attempts to detect URL-shaped paths, and rewrite > them to a prefix. > There are several issues here: > 1. there doesn't seem to be any concrete documentation about this > 2. apparently there is no test coverage - removing that code causes no test > failures > 3. it's unclear whether not replacing an empty string by "/" is intentional -- This message was sent by Atlassian Jira (v8.20.10#820010)