This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new c611752666 Simplify
c611752666 is described below
commit c611752666f9b1e54329fdb622d2087b970f0442
Author: remm <[email protected]>
AuthorDate: Fri Jan 19 16:00:19 2024 +0100
Simplify
---
java/org/apache/tomcat/websocket/PerMessageDeflate.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/java/org/apache/tomcat/websocket/PerMessageDeflate.java
b/java/org/apache/tomcat/websocket/PerMessageDeflate.java
index 6e6797d812..1868b2a4bd 100644
--- a/java/org/apache/tomcat/websocket/PerMessageDeflate.java
+++ b/java/org/apache/tomcat/websocket/PerMessageDeflate.java
@@ -321,8 +321,9 @@ public class PerMessageDeflate implements Transformation {
continue;
}
- boolean emptyPart = uncompressedPart.getPayload().limit() == 0;
- emptyMessage = emptyMessage && emptyPart;
+ if (uncompressedPart.getPayload().limit() != 0) {
+ emptyMessage = false;
+ }
if (emptyMessage && uncompressedPart.isFin()) {
// Zero length messages can't be compressed so pass the
// final (empty) part straight through.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]