Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-63936

RequestDispatcher implementation of org.eclipse.equinox.http.servlet.jar doesn't conform to the servlet spec

    Details

    • Fix Priority:
      4

      Description

      When response.setHeader(String, String) is called from a portlet, the header will be set automatically on the original response object too instantiated by the container. This shouldn't happen, because we dispatch to PortletServlet from InvokerPortletImpl.invoke through RequestDispatcher.include(ServletRequest, ServletResponse), and according to the servlet spec (Section 9.3 The Include Method) header manipulation is not allowed in that case:

      The included servlet cannot change the response status code or set headers; any attempt to make a change is ignored.

      The problem seems to come from Equinox whose RequestDispatcher implementation (org.eclipse.equinox.http.servlet.internal.servlet.RequestDispatcherAdaptor) doesn't follow the spec regarding this.

      (Transferring the headers happened only via MetaInfoCacheServletResponse.finishResponse(boolean) before introducing Equinox.)

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  2 years, 21 weeks, 4 days ago

                  Packages

                  Version Package