diff --git a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/plugins/HttpPluginServlet.java b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/plugins/HttpPluginServlet.java index 4dc6f1eb5c..aa2e27a601 100644 --- a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/plugins/HttpPluginServlet.java +++ b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/plugins/HttpPluginServlet.java @@ -584,7 +584,7 @@ class HttpPluginServlet extends HttpServlet private void sendJsPlugin(Plugin plugin, ResourceKey key, HttpServletRequest req, HttpServletResponse res) throws IOException { File pluginFile = plugin.getSrcFile(); - if (req.getPathInfo().equals(getJsPluginPath(plugin)) && pluginFile.exists()) { + if (req.getRequestURI().equals(getJsPluginPath(plugin)) && pluginFile.exists()) { res.setHeader("Content-Length", Long.toString(pluginFile.length())); res.setContentType("application/javascript"); writeToResponse(res, new FileInputStream(pluginFile)); @@ -595,7 +595,7 @@ class HttpPluginServlet extends HttpServlet } private static String getJsPluginPath(Plugin plugin) { - return String.format("%s/static/%s", plugin.getName(), plugin.getSrcFile() + return String.format("/plugins/%s/static/%s", plugin.getName(), plugin.getSrcFile() .getName()); }