Merge "Fix getRequestURI for wrapped http requests served via plugins."

This commit is contained in:
Shawn Pearce 2013-06-19 16:18:58 +00:00 committed by Gerrit Code Review
commit adf994f398

View File

@ -624,8 +624,16 @@ class HttpPluginServlet extends HttpServlet
@Override
public String getServletPath() {
return ((HttpServletRequest) getRequest()).getRequestURI().substring(
contextPath.length());
return getRequestURI().substring(contextPath.length());
}
@Override
public String getRequestURI() {
String uri = super.getRequestURI();
if (uri.startsWith("/a/")) {
uri = uri.substring(2);
}
return uri;
}
}
}