servletPath consistency for wrapped plugin HttpRequest.
HttpServletRequest.getServletPath() should not include the contextPath part: this semantics needs to be preserved for Http plugins in order to avoid inconsistencies in plugged Http Services. i.e. GitBlit RSS syndication filter was not working properly because of context path found multiple times in Servlet path. Change-Id: I7d6cd584b72b1e6f91ad5c53a45307f9dcdb6b8c Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
This commit is contained in:
@@ -602,7 +602,8 @@ class HttpPluginServlet extends HttpServlet
|
||||
|
||||
@Override
|
||||
public String getServletPath() {
|
||||
return ((HttpServletRequest) getRequest()).getRequestURI();
|
||||
return ((HttpServletRequest) getRequest()).getRequestURI().substring(
|
||||
contextPath.length());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user