Merge "Fix displaying of the branch-network"
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;