Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-11722

The SlingRequestDispatcher doesn't correctly implement the RequestDispatcher API

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • Engine 2.14.0
    • Engine
    • None

    Description

      The include method [0] has the following important sentence in its documentation:

      The ServletResponse object has its path elements and parameters remain unchanged from the caller's. The included servlet cannot change the response status code or set headers; any attempt to make a change is ignored.

      However, the SlingRequestDispatcher [1] doesn't enforce this in any way.

      [0] - https://docs.oracle.com/javaee/7/api/javax/servlet/RequestDispatcher.html#include-javax.servlet.ServletRequest-javax.servlet.ServletResponse-
      [1] - https://github.com/apache/sling-org-apache-sling-engine/blob/bbc6acca70e7a27386f47fa9733af3740985f375/src/main/java/org/apache/sling/engine/impl/request/SlingRequestDispatcher.java#L177

      Attachments

        Issue Links

          Activity

            People

              radu Radu Cotescu
              radu Radu Cotescu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 50m
                  1h 50m