You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2020/07/08 22:54:18 UTC
[tomcat] branch 9.0.x updated: Check empty flag when calculating
available bytes
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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org