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

markt 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 47157c4  Check empty flag when calculating available bytes
47157c4 is described below

commit 47157c416c73dff5d461a81830b2836c47605e1e
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Jul 8 23:53:03 2020 +0100

    Check empty flag when calculating available bytes
---
 java/org/apache/coyote/ajp/AjpProcessor.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/coyote/ajp/AjpProcessor.java 
b/java/org/apache/coyote/ajp/AjpProcessor.java
index 730cbd1..fb1b850 100644
--- a/java/org/apache/coyote/ajp/AjpProcessor.java
+++ b/java/org/apache/coyote/ajp/AjpProcessor.java
@@ -1304,7 +1304,11 @@ public class AjpProcessor extends AbstractProcessor {
 
         @Override
         public int available() {
-            return bodyBytes.getByteChunk().getLength();
+            if (empty) {
+                return 0;
+            } else {
+                return bodyBytes.getByteChunk().getLength();
+            }
         }
     }
 


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

Reply via email to