Skip to content

Commit

Permalink
PLUTO-781 PortletRequestDispatcherImpl forwards to incorrect path
Browse files Browse the repository at this point in the history
  • Loading branch information
ngriffin7a committed Dec 16, 2021
1 parent 836bc2f commit b06210f
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

import javax.portlet.ClientDataRequest;
import javax.portlet.HeaderRequest;
import javax.portlet.PortletConfig;
import javax.portlet.PortletException;
import javax.portlet.PortletRequest;
import javax.portlet.RenderRequest;
Expand Down Expand Up @@ -374,7 +375,19 @@ public void startForward(String path) {
de.type = Type.FWD;
de.qparms = processPath(path);
dispatches.add(de);
isMethSpecialHandling = true; //!isForwardingPossible(); (logical, but not to spec)
isMethSpecialHandling = true;

// PLUTO-781
PortletConfig portletConfig = reqctx.getPortletConfig();
String initParameter = portletConfig.getInitParameter("org.apache.pluto.enable.nested.resource.forwards");
if ("true".equalsIgnoreCase(initParameter)) {
// Note: When isMethSpecialHandling is false, it causes failures
// in the following Portlet 3.0 TCK tests:
// V2DispatcherTests5_SPEC2_19_IncThenForwardServletResource_invoke7
// V2DispatcherTests6_SPEC2_19_FwdThenForwardServletResource_invoke7
isMethSpecialHandling = !isForwardingPossible(); // (logical, but not to spec)
}

isAttrSpecialHandling = true;

reqctx.startDispatch(this, de.qparms, phase);
Expand Down

0 comments on commit b06210f

Please sign in to comment.