[ 
https://issues.apache.org/jira/browse/SLING-8753?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16941637#comment-16941637
 ] 

Karl Pauls commented on SLING-8753:
-----------------------------------

[~cziegeler], so you are saying it is a public version of the provided jasper 
include wrapper [0]? In that case it might want to make it clear it should only 
be used in the include scenario. Using it as a general wrapper in e.g. a 
forward makes it super inconsistent otherwise and I still think it should at a 
minimum take reset() into account.


[0] 
https://github.com/apache/sling-org-apache-sling-scripting-jsp/blob/master/src/main/java/org/apache/sling/scripting/jsp/jasper/runtime/ServletResponseWrapperInclude.java
 

> JspSlingHttpServletResponseWrapper resetBuffer() doesn't call super and 
> doesn't handle reset()
> ----------------------------------------------------------------------------------------------
>
>                 Key: SLING-8753
>                 URL: https://issues.apache.org/jira/browse/SLING-8753
>             Project: Sling
>          Issue Type: Bug
>          Components: Scripting
>    Affects Versions: Scripting JSP 2.3.6
>            Reporter: Karl Pauls
>            Priority: Major
>             Fix For: Scripting JSP 2.3.8
>
>
> The JspSlingHttpServletResponseWrapper overrides resetBuffer() and does clear 
> the JSPWriter in that case. That makes sense, however, it doesn't call 
> super.resetBuffer() which means it might not clear whatever else is in the 
> underlying response buffer. 
> Furthermore, it doesn't override reset() - hence, it will keep the JSPWriter 
> content in case of a reset() but the underlying buffer will be cleared. 
> This seems highly inconsistent and unless I'm missing something, we should 
> change this to have resetBuffer() call super.resetBuffer() after clearing the 
> JSPWriter and override reset() to clear the JSPWriter before calling 
> super.reset().



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to