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
commit 16a2315ea0a25a45bbc816f70a8c0f6e9a8bc675 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 01fd70b..71ff866 100644 --- a/java/org/apache/catalina/connector/CoyoteAdapter.java +++ b/java/org/apache/catalina/connector/CoyoteAdapter.java @@ -211,7 +211,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 7678111..be557a6 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-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org