fix double / in url

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1177075 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2011-09-28 21:38:13 +00:00
parent e442d48741
commit e259d38caf
1 changed files with 6 additions and 2 deletions

View File

@ -257,7 +257,11 @@ public class DefaultSearchService
}
StringBuilder sb = new StringBuilder( getBaseUrl( httpContext.getHttpServletRequest() ) );
sb.append( "/repository/" );
sb.append( "/repository" );
if ( !StringUtils.startsWith( artifact.getUrl(), "/" ) )
{
sb.append( '/' );
}
sb.append( artifact.getUrl() );
return sb.toString();
}