Merged BRANCHES/DEV/CLOUD1_SP to HEAD:

39001: WebDAV: getURLForPath(...) appends trailing slash to path prefix if missing.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@39108 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Matt Ward
2012-07-11 17:21:29 +00:00
parent 771502842d
commit 7feacee975

View File

@@ -446,6 +446,10 @@ public class WebDAV
*/ */
public static String getURLForPath(HttpServletRequest request, String urlPathPrefix, String path, boolean isCollection, String userAgent) public static String getURLForPath(HttpServletRequest request, String urlPathPrefix, String path, boolean isCollection, String userAgent)
{ {
if (!urlPathPrefix.endsWith(WebDAV.PathSeperator))
{
urlPathPrefix = urlPathPrefix + WebDAV.PathSeperator;
}
StringBuilder urlStr = new StringBuilder(urlPathPrefix); StringBuilder urlStr = new StringBuilder(urlPathPrefix);
if (path.equals(RootPath) == false) if (path.equals(RootPath) == false)