From 9a2c130827e41e09d0556d3e67858551d893930c Mon Sep 17 00:00:00 2001 From: Andrew Pielage Date: Wed, 6 Nov 2024 17:48:36 +0000 Subject: [PATCH] FISH-10056 Don't attempt to set response buffer size on a committed response Signed-off-by: Andrew Pielage --- .../faces/application/view/FaceletViewHandlingStrategy.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/impl/src/main/java/com/sun/faces/application/view/FaceletViewHandlingStrategy.java b/impl/src/main/java/com/sun/faces/application/view/FaceletViewHandlingStrategy.java index f4f390fc4c..3b0dd8052d 100644 --- a/impl/src/main/java/com/sun/faces/application/view/FaceletViewHandlingStrategy.java +++ b/impl/src/main/java/com/sun/faces/application/view/FaceletViewHandlingStrategy.java @@ -898,7 +898,11 @@ protected ResponseWriter createResponseWriter(FacesContext context) throws IOExc // set the buffer for content, -1 indicates nothing should be set. if (responseBufferSize != -1) { - extContext.setResponseBufferSize(responseBufferSize); + if (!extContext.isResponseCommitted()) { + extContext.setResponseBufferSize(responseBufferSize); + } else { + LOGGER.warning("Skipping attempt to set buffer size on a committed response"); + } } // get our content type