Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Auge2019-02-12 14:44:13 -0500
committerRaymond Auge2019-02-12 16:18:19 -0500
commiteaf4caf2f686c2010003993cc55734efc1a6cb18 (patch)
tree285e4b0f8b3624ba2b4f1d41d0938faaeabe8415
parent13f073a0f979c092f3b36c6487b3ce8435df8555 (diff)
downloadrt.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.java8
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 d56f0825..df672ad5 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());
}
/**

Back to the top