Skip to content

Commit

Permalink
Merge pull request #7140 from luiseufrasio/FISH-61-cannot-change-buff…
Browse files Browse the repository at this point in the history
…er-size-p6

FISH-61 : only checking if response was commited
  • Loading branch information
luiseufrasio authored Dec 19, 2024
2 parents 092bb72 + 71d4cb0 commit 71b8d1b
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Portions Copyright [2019-2023] Payara Foundation and/or affiliates
// Portions Copyright [2019-2024] Payara Foundation and/or affiliates

package org.apache.catalina.connector;

Expand Down Expand Up @@ -901,15 +901,12 @@ public void resetBuffer(boolean resetWriterStreamFlags) {
*/
@Override
public void setBufferSize(int size) {

if (isCommitted() || !outputBuffer.isNew())
if (isCommitted()) {
throw new IllegalStateException(rb.getString(LogFacade.CANNOT_CHANGE_BUFFER_SIZE_EXCEPTION));

}
outputBuffer.setBufferSize(size);

}


/**
* Set the content length (in bytes) for this Response.
*
Expand Down

0 comments on commit 71b8d1b

Please sign in to comment.