You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (Jira)" <ji...@apache.org> on 2019/10/01 08:31:00 UTC

[jira] [Commented] (SLING-8753) JspSlingHttpServletResponseWrapper resetBuffer() doesn't call super and doesn't handle reset()

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

Carsten Ziegeler commented on SLING-8753:
-----------------------------------------

I'm not sure if resetBuffer should call super - if a jsp is included and calls resetBuffer it should only reset the buffer for the current jsp, not the buffer for the jsp including this
Thinking about it, the same issue might be with reset

> 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)