[ https://issues.apache.org/jira/browse/SLING-11722?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17645173#comment-17645173 ]
Radu Cotescu edited comment on SLING-11722 at 2/21/23 1:24 PM: --------------------------------------------------------------- Fixed in [commit 5d8df33|https://github.com/apache/sling-org-apache-sling-engine/commit/5d8df33] and commit [ece93401|https://github.com/apache/sling-org-apache-sling-engine/commit/ece93401392f7fb3b75b02af62d392e75120d245]. was (Author: radu.cotescu): Fixed in [commit 5d8df33|https://github.com/apache/sling-org-apache-sling-engine/commit/5d8df33]. > The SlingRequestDispatcher doesn't correctly implement the RequestDispatcher > API > -------------------------------------------------------------------------------- > > Key: SLING-11722 > URL: https://issues.apache.org/jira/browse/SLING-11722 > Project: Sling > Issue Type: Bug > Components: Engine > Reporter: Radu Cotescu > Assignee: Radu Cotescu > Priority: Major > Fix For: Engine 2.13.4 > > Time Spent: 1h 50m > Remaining Estimate: 0h > > The {{include}} method [0] has the following important sentence in its > documentation: > {quote} > 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. > {quote} > 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 -- This message was sent by Atlassian Jira (v8.20.10#820010)