Skip to content

Commit

Permalink
PBR-570 BZ1162145 - Check for committed responses before resetting th…
Browse files Browse the repository at this point in the history
…e buffer.
  • Loading branch information
jpkrohling committed Nov 11, 2014
1 parent 60c2898 commit f49fa02
Showing 1 changed file with 6 additions and 3 deletions.
Expand Up @@ -79,10 +79,13 @@ public void handle() throws FacesException {
// this would happen if there's an error on the
// errorView and would cause an infinite loop
if (!errorView.equals(bridgeContext.getRedirectViewId())) {
fc.getExternalContext().responseReset();
fc.getExternalContext().setResponseBufferSize(-1);
// browser has seen already some content, so, we can't
// reset the buffer/response
if (!fc.getExternalContext().isResponseCommitted()) {
fc.getExternalContext().responseReset();
fc.getExternalContext().setResponseBufferSize(-1);
}
bridgeContext.setRedirectViewId(errorView);

bridgeContext.setRenderRedirect(true);
}
} else {
Expand Down

0 comments on commit f49fa02

Please sign in to comment.