You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2024/02/29 15:14:27 UTC

(tomcat) branch 9.0.x updated: Merge pull request #703 from RealTake/main

This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
     new 671965bca4 Merge pull request #703 from RealTake/main
671965bca4 is described below

commit 671965bca4dd13f655686d0f40af90632c80d8d0
Author: Rémy Maucherat <re...@apache.org>
AuthorDate: Thu Feb 29 16:05:43 2024 +0100

    Merge pull request #703 from RealTake/main
    
    Remove duplicate if statements from the OutputBuffer.close() method
---
 java/org/apache/catalina/connector/OutputBuffer.java | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/java/org/apache/catalina/connector/OutputBuffer.java b/java/org/apache/catalina/connector/OutputBuffer.java
index 7a395c0f05..f522a09ad5 100644
--- a/java/org/apache/catalina/connector/OutputBuffer.java
+++ b/java/org/apache/catalina/connector/OutputBuffer.java
@@ -239,9 +239,7 @@ public class OutputBuffer extends Writer {
             // request since in that case no body should have been written and
             // setting a value of zero here will result in an explicit content
             // length of zero being set on the response.
-            if (!coyoteResponse.isCommitted()) {
-                coyoteResponse.setContentLength(bb.remaining());
-            }
+            coyoteResponse.setContentLength(bb.remaining());
         }
 
         if (coyoteResponse.getStatus() == HttpServletResponse.SC_SWITCHING_PROTOCOLS) {


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org