diff options
author | Raymond Auge | 2019-02-12 19:44:13 +0000 |
---|---|---|
committer | Raymond Auge | 2019-02-12 21:18:19 +0000 |
commit | eaf4caf2f686c2010003993cc55734efc1a6cb18 (patch) | |
tree | 285e4b0f8b3624ba2b4f1d41d0938faaeabe8415 | |
parent | 13f073a0f979c092f3b36c6487b3ce8435df8555 (diff) | |
download | rt.equinox.bundles-eaf4caf2f686c2010003993cc55734efc1a6cb18.tar.gz rt.equinox.bundles-eaf4caf2f686c2010003993cc55734efc1a6cb18.tar.xz rt.equinox.bundles-eaf4caf2f686c2010003993cc55734efc1a6cb18.zip |
Bug 544394 - [http whiteboard] INCLUDE dispatching in bridge mode mishandles reconstruction of requestURIY20190213-0305I20190212-1800
Signed-off-by: Raymond Auge <raymond.auge@liferay.com>
-rw-r--r-- | bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/servlet/ProxyServlet.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/servlet/ProxyServlet.java b/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/servlet/ProxyServlet.java index d56f08259..df672ad5d 100644 --- a/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/servlet/ProxyServlet.java +++ b/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/servlet/ProxyServlet.java @@ -77,7 +77,13 @@ public class ProxyServlet extends HttpServlet { return null; } String requestUri = HttpServletRequestWrapperImpl.getDispatchRequestURI(request); - return requestUri.substring(request.getContextPath().length() + request.getServletPath().length()); + String contextPath = request.getContextPath(); + String servletPath = request.getServletPath(); + if (request.getDispatcherType() == DispatcherType.INCLUDE) { + contextPath = (String)request.getAttribute(RequestDispatcher.INCLUDE_CONTEXT_PATH); + servletPath = (String)request.getAttribute(RequestDispatcher.INCLUDE_SERVLET_PATH); + } + return requestUri.substring(contextPath.length() + servletPath.length()); } /** |