improve bzr repository view

This commit is contained in:
Sebastian Sdorra
2011-01-05 17:50:50 +01:00
parent 2311e57020
commit cb2b9f96f5
4 changed files with 229 additions and 17 deletions

View File

@@ -43,6 +43,7 @@ import org.eclipse.jgit.http.server.resolver.RepositoryResolver;
import org.eclipse.jgit.lib.Repository;
import sonia.scm.repository.GitRepositoryHandler;
import sonia.scm.util.HttpUtil;
//~--- JDK imports ------------------------------------------------------------
@@ -106,7 +107,7 @@ public class ScmGitServlet extends GitServlet
HttpServletResponse response)
throws ServletException, IOException
{
String uri = getRelativePath(request);
String uri = HttpUtil.getStrippedURI(request);
if (uri.matches(REGEX_GITHTTPBACKEND))
{
@@ -133,7 +134,7 @@ public class ScmGitServlet extends GitServlet
HttpServletResponse response)
throws ServletException, IOException
{
String uri = getRelativePath(request);
String uri = HttpUtil.getStrippedURI(request);
Matcher m = REGEX_REPOSITORYNAME.matcher(uri);
String name = null;
Repository repository = null;
@@ -168,21 +169,6 @@ public class ScmGitServlet extends GitServlet
}
}
//~--- get methods ----------------------------------------------------------
/**
* Method description
*
*
* @param request
*
* @return
*/
private String getRelativePath(HttpServletRequest request)
{
return request.getRequestURI().substring(request.getContextPath().length());
}
//~--- fields ---------------------------------------------------------------
/** Field description */