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 2021/03/22 22:05:24 UTC
[tomcat] 03/05: Refactor onDataAvailable() in preparation for
fixing BZ 64771
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 89e16ba72a5b7c56ac5120b6a46da783fe7947cd
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Mar 22 21:51:24 2021 +0000
Refactor onDataAvailable() in preparation for fixing BZ 64771
https://bz.apache.org/bugzilla/show_bug.cgi?id=64771
---
java/org/apache/catalina/connector/CoyoteAdapter.java | 2 +-
java/org/apache/coyote/Request.java | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/java/org/apache/catalina/connector/CoyoteAdapter.java b/java/org/apache/catalina/connector/CoyoteAdapter.java
index 9d06af9..766c11f 100644
--- a/java/org/apache/catalina/connector/CoyoteAdapter.java
+++ b/java/org/apache/catalina/connector/CoyoteAdapter.java
@@ -218,7 +218,7 @@ public class CoyoteAdapter implements Adapter {
// onAllDataRead() event. Therefore, make sure
// onDataAvailable() is not called in this case.
if (!request.isFinished()) {
- readListener.onDataAvailable();
+ req.onDataAvailable();
}
if (request.isFinished() && req.sendAllDataReadEvent()) {
readListener.onAllDataRead();
diff --git a/java/org/apache/coyote/Request.java b/java/org/apache/coyote/Request.java
index e930b0e..8f8554e 100644
--- a/java/org/apache/coyote/Request.java
+++ b/java/org/apache/coyote/Request.java
@@ -215,6 +215,10 @@ public final class Request {
return result.get();
}
+ public void onDataAvailable() throws IOException {
+ listener.onDataAvailable();
+ }
+
private final AtomicBoolean allDataReadEventSent = new AtomicBoolean(false);
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org