Fix displaying of the branch-network The canonicalPath must only be a path and not a full URL. This was broken by commit 69d412506b78978ea91e7ac62b2828003823010a. Change-Id: I44186505778fb44760fd36c2774086370c851f44 Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
diff --git a/src/main/java/com/googlesource/gerrit/plugins/branchnetwork/canvas/GitGraphServlet.java b/src/main/java/com/googlesource/gerrit/plugins/branchnetwork/canvas/GitGraphServlet.java index 2145ac8..50ee03a 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/branchnetwork/canvas/GitGraphServlet.java +++ b/src/main/java/com/googlesource/gerrit/plugins/branchnetwork/canvas/GitGraphServlet.java
@@ -16,6 +16,7 @@ import java.io.IOException; import java.io.PrintWriter; import java.net.MalformedURLException; +import java.net.URL; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; @@ -63,7 +64,7 @@ canonicalWebUrl += "/"; } this.canonicalPath = - String.format("%splugins/%s/", canonicalWebUrl, pluginName); + String.format("%splugins/%s/", (new URL(canonicalWebUrl)).getPath(), pluginName); this.projectControl = projectControl; this.repoManager = repoManager; this.gitWebConfig = gitWebConfig;