support servlet path as well

This commit is contained in:
kimchy 2011-02-18 05:12:26 +02:00
parent d8bec39b73
commit 5e2ca6fb5d
1 changed files with 2 additions and 2 deletions

View File

@ -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() {