raducotescu commented on code in PR #50:
URL: 
https://github.com/apache/sling-org-apache-sling-engine/pull/50#discussion_r1800778080


##########
src/main/java/org/apache/sling/engine/impl/SlingHttpServletResponseImpl.java:
##########
@@ -311,7 +331,19 @@ public void setContentType(final String type) {
         }
     }
 
-    private String getMessage(String currentContentType, String 
setContentType) {
+    /**
+     * Retrieves the message to log when the 'Content-Type' header is changed 
via an include.
+     * @param currentContentType the current 'Content-Type' header
+     * @param setContentType the 'Content-Type' header that is being set
+     * @param error whether the message should be a warning or an error
+     * @return the message to log
+     */
+    private String getMessage(String currentContentType, String 
setContentType, boolean error) {
+        if (!error) {
+            return String.format(
+                    "Servlet %s tried to override the 'Content-Type' header 
from '%s' to '%s'.",

Review Comment:
   Improved in b57d4951.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to