myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eduardo Breijo (JIRA)" <>
Subject [jira] [Updated] (MYFACES-4125) Response committed too early due to flush from StateWriter
Date Tue, 22 Aug 2017 18:54:00 GMT


Eduardo Breijo updated MYFACES-4125:
       Resolution: Fixed
    Fix Version/s: 2.3.0
           Status: Resolved  (was: Patch Available)

> Response committed too early due to flush from StateWriter
> ----------------------------------------------------------
>                 Key: MYFACES-4125
>                 URL:
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.2.12
>            Reporter: Eduardo Breijo
>            Assignee: Eduardo Breijo
>             Fix For: 2.2.13-SNAPSHOT, 2.3.0
>         Attachments: MYFACES-4125.patch, server.log, StateWriter.war
> We've found a problem where it seems that MyFaces is flushing output too early in the
RENDER_RESPONSE PHASE. As a result the response is committed before we have a chance to handle
an error in that phase. 
> This is because the renderView method from FaceletViewDeclarationLanguage calls writer.endDocument()
which ends up calling the flush() method from StateWriter. This commit behavior is different
between 2.0 and 2.2.  It looks like a flush() was empty on 2.0, and now a call was added,
which causes the issue we are seeing.
> Here's a sample app:
> 1) Drive a request: localhost:9080/StateWriter/index.xhtml
> 2) You should be able to see in the logs that response was committed, so redirect to
error.xhtml cannot be performed.

This message was sent by Atlassian JIRA

View raw message