[ https://issues.apache.org/jira/browse/PLUTO-731?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Neil Griffin reopened PLUTO-731: -------------------------------- > TCK: Contesting usage of PortletRequest.getProperty("Referer") in > V3RenderStateTests > ------------------------------------------------------------------------------------ > > Key: PLUTO-731 > URL: https://issues.apache.org/jira/browse/PLUTO-731 > Project: Pluto > Issue Type: Bug > Components: tck > Affects Versions: 3.0.0, 3.0.1 > Reporter: Neil Griffin > Assignee: Neil Griffin > Priority: Major > Fix For: 3.1.0 > > > The TCK test case for > V3RenderStateTests_SPEC2_12_MutableRenderState_setPortletMode5 looks like the > following: > {code:java|title=RenderStateTests_SPEC2_12_MutableRenderState.java} > /* > * TestCase: > * V3RenderStateTests_SPEC2_12_MutableRenderState_setPortletMode5 > */ > /* > * Details: > * "Throws IllegalStateException if the method is invoked after sendRedirect > has been called." > */ > TestResult result = tcd.getTestResultFailed( > V3RENDERSTATETESTS_SPEC2_12_MUTABLERENDERSTATE_SETPORTLETMODE5); > try { > String referer = portletReq.getProperty("Referer"); > portletResp.sendRedirect(referer); > portletResp.setPortletMode(PortletMode.UNDEFINED); > } catch (IllegalStateException e) { > result.setTcSuccess(true); > result.appendTcDetail(e.toString()); > } > result.writeTo(writer); > {code} > This issue is contesting usage of {{PortletRequest.getProperty("Referer")}} > since the test anticipates a {{RenderURL}} for redirection. When the TCK runs > in an automated fashion, > V3RenderStateTests_SPEC2_12_MutableRenderState_setPortletMode4 precedes > V3RenderStateTests_SPEC2_12_MutableRenderState_setPortletMode5. Since Apache > Pluto implements the post-redirect-get design pattern, the "Referer" is a > RenderURL. Liferay Portal does not implement post-redirect-get by default, > and the "Referer" is an ActionURL. > A more appropriate URL to use for redirection is the new Portlet 3.0 > {{ActionResponse.createRedirectURL(MimeResponse.Copy)}} method. > V3RenderStateTests_SPEC2_12_MutableRenderState_setWindowState5 has the same > issue. -- This message was sent by Atlassian JIRA (v7.6.3#76005)