From 5e2ca6fb5dfa24534b0d4fa54cc665b94d6a2234 Mon Sep 17 00:00:00 2001 From: kimchy Date: Fri, 18 Feb 2011 05:12:26 +0200 Subject: [PATCH] support servlet path as well --- .../main/java/org/elasticsearch/wares/ServletRestRequest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/transport/wares/src/main/java/org/elasticsearch/wares/ServletRestRequest.java b/plugins/transport/wares/src/main/java/org/elasticsearch/wares/ServletRestRequest.java index e204ccb4c51..7e45f96f74a 100644 --- a/plugins/transport/wares/src/main/java/org/elasticsearch/wares/ServletRestRequest.java +++ b/plugins/transport/wares/src/main/java/org/elasticsearch/wares/ServletRestRequest.java @@ -56,11 +56,11 @@ public class ServletRestRequest extends AbstractRestRequest implements org.elast } @Override public String uri() { - return servletRequest.getRequestURI().substring(servletRequest.getContextPath().length()); + return servletRequest.getRequestURI().substring(servletRequest.getContextPath().length() + servletRequest.getServletPath().length()); } @Override public String rawPath() { - return servletRequest.getRequestURI().substring(servletRequest.getContextPath().length()); + return servletRequest.getRequestURI().substring(servletRequest.getContextPath().length() + servletRequest.getServletPath().length()); } @Override public boolean hasContent() {