commit | 2d6f69a0254e0d10d68f60dd6ba44a51ef33d16f | [log] [tgz] |
---|---|---|
author | David Ostrovsky <david@ostrovsky.org> | Sun May 18 00:18:32 2014 +0200 |
committer | David Ostrovsky <david@ostrovsky.org> | Sun May 18 01:18:42 2014 +0200 |
tree | 7f3c64b51417ba6072fef77ff62cf5f253b6a428 | |
parent | 3f7fcd216fedda17723238da34222e86babc58c0 [diff] |
Replace getServletPath() with getPathInfo() Since Ie8d9a9ac1 getServletPath() returns empty string. Use getPathInfo() instead. Change-Id: I6853c0c61be9cafe66452ddd62f1801c754b4c86
diff --git a/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/velocity/VelocityStaticServlet.java b/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/velocity/VelocityStaticServlet.java index c48fe9a..11921d5 100644 --- a/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/velocity/VelocityStaticServlet.java +++ b/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/velocity/VelocityStaticServlet.java
@@ -103,7 +103,7 @@ } private Resource local(final HttpServletRequest req) { - final String name = req.getServletPath(); + final String name = req.getPathInfo(); if (name.length() < 2 || !name.startsWith("/") || isUnreasonableName(name)) { // Too short to be a valid file name, or doesn't start with // the path info separator like we expected.
diff --git a/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/velocity/VelocityViewServlet.java b/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/velocity/VelocityViewServlet.java index 4ba74a5..de76a7a 100644 --- a/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/velocity/VelocityViewServlet.java +++ b/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/velocity/VelocityViewServlet.java
@@ -71,7 +71,7 @@ HttpServletRequest req = (HttpServletRequest) request; HttpServletResponse resp = (HttpServletResponse) response; - String servletPath = req.getServletPath(); + String servletPath = req.getPathInfo(); NextPage nextPage = (NextPage) req.getAttribute("destUrl"); String destUrl = null; if (nextPage != null && !nextPage.uri.startsWith("/")) {
diff --git a/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/wizard/VelocityControllerServlet.java b/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/wizard/VelocityControllerServlet.java index 2680e77..1e311b3 100644 --- a/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/wizard/VelocityControllerServlet.java +++ b/github-plugin/src/main/java/com/googlesource/gerrit/plugins/github/wizard/VelocityControllerServlet.java
@@ -93,7 +93,7 @@ private String getControllerClassName(HttpServletRequest req) { String reqServletName; StringBuilder controllerName = new StringBuilder(); - reqServletName = req.getServletPath(); + reqServletName = req.getPathInfo(); reqServletName = trimFromChar(reqServletName, '/'); reqServletName = trimUpToChar(reqServletName, '.'); String[] controllerNameParts = reqServletName.split("-");