This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push:
new fde19a0759 Merge pull request #703 from RealTake/main
fde19a0759 is described below
commit fde19a07591bc671558144ac6f198b5bd1a5fdf9
Author: Rémy Maucherat <[email protected]>
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 3b7bdc5fd5..de6dbd35fd 100644
--- a/java/org/apache/catalina/connector/OutputBuffer.java
+++ b/java/org/apache/catalina/connector/OutputBuffer.java
@@ -235,9 +235,7 @@ public class OutputBuffer extends Writer {
if ((!coyoteResponse.isCommitted()) &&
(coyoteResponse.getContentLengthLong() == -1)) {
// If this didn't cause a commit of the response, the final content
// length can be calculated.
- if (!coyoteResponse.isCommitted()) {
- coyoteResponse.setContentLength(bb.remaining());
- }
+ coyoteResponse.setContentLength(bb.remaining());
}
if (coyoteResponse.getStatus() ==
HttpServletResponse.SC_SWITCHING_PROTOCOLS) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]