This is an automated email from the ASF dual-hosted git repository.

cziegeler pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-engine.git


The following commit(s) were added to refs/heads/master by this push:
     new 24b13fd  SLING-11514 : Provide dispatcher option to ignore header 
changes on include. Fix NPE if no dispatcher option is set
24b13fd is described below

commit 24b13fde756ae763f697ba3428e32ff4c6cccce4
Author: Carsten Ziegeler <[email protected]>
AuthorDate: Mon Aug 8 16:25:45 2022 +0200

    SLING-11514 : Provide dispatcher option to ignore header changes on 
include. Fix NPE if no dispatcher option is set
---
 .../org/apache/sling/engine/impl/request/SlingRequestDispatcher.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/src/main/java/org/apache/sling/engine/impl/request/SlingRequestDispatcher.java
 
b/src/main/java/org/apache/sling/engine/impl/request/SlingRequestDispatcher.java
index 79cc37f..c83ea08 100644
--- 
a/src/main/java/org/apache/sling/engine/impl/request/SlingRequestDispatcher.java
+++ 
b/src/main/java/org/apache/sling/engine/impl/request/SlingRequestDispatcher.java
@@ -214,8 +214,9 @@ public class SlingRequestDispatcher implements 
RequestDispatcher {
         SlingRequestPathInfo info = getMergedRequestPathInfo(cRequest);
         requestProgressTracker.log(
             "Including resource {0} ({1})", resource, info);
+        final boolean protectHeaders = this.options != null ? 
this.options.isProtectHeadersOnInclude() : false;
         rd.getSlingRequestProcessor().dispatchRequest(request, response, 
resource,
-            info, include, this.options.isProtectHeadersOnInclude());
+            info, include, protectHeaders);
     }
 
     /**

Reply via email to