You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org> on 2010/02/05 07:24:28 UTC

[jira] Resolved: (MYFACES-2500) ResponseWriter clone should not include itself

     [ https://issues.apache.org/jira/browse/MYFACES-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthias Weßendorf resolved MYFACES-2500.
-----------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.0-beta-2

thx for Andy Schwartz's patch.

I picked the "cleaner" patch I also prefer reusing introduced vars.

> ResponseWriter clone should not include itself
> ----------------------------------------------
>
>                 Key: MYFACES-2500
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2500
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 2.0.0-alpha
>            Reporter: Andy Schwartz
>            Priority: Minor
>             Fix For: 2.0.0-beta-2
>
>         Attachments: myfaces-2500-cleaner.patch, myfaces-2500.patch
>
>
> MyFaces suffers from the problem described here:
> https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=1515
> Apologies for the Mojarra reference. :-)
> In the MyFaces case, the problem exists in two places:
> 1. org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage
> In particular, in renderView(), we do:
>             ResponseWriter origWriter = createResponseWriter(context);
>             StateWriter stateWriter = new StateWriter(origWriter, 1024);  <-------- Here
>             try
>             {
>                 ResponseWriter writer = origWriter.cloneWithWriter(stateWriter);
> Instead of wrapping the StateWriter around the ResponseWriter (and then cloning that ResponseWriter with itself), we should be wrapping the StateWriter around the Writer returned by ExternalContext.getResponseOutputWriter().
> 2.  org.apache.myfaces.view.facelets.FaceletViewHandler
> Again, in renderView, we've got:
>             ResponseWriter origWriter = this.createResponseWriter(context);
>             // QUESTION: should we use bufferSize? Or, since the
>             // StateWriter usually only needs a small bit at the end,
>             // should we always use a much smaller size?
>             stateWriter = new StateWriter(origWriter, this.bufferSize != -1 ? this.bufferSize : 1024);
>             ResponseWriter writer = origWriter.cloneWithWriter(stateWriter);
> So the same issue exists here.
> FWIW, not sure whether FaceletViewHandler is still used - perhaps this is now obsolete?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.