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 19:32:22 UTC
[tomcat] branch master updated (5803d56 -> 174fa56)
This is an automated email from the ASF dual-hosted git repository.
markt pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git.
from 5803d56 Avoid reflection use for classloader configuration
new b87bb5f Cosmetic clean-up. Better comments.
new 174fa56 Better variable name. These are request headers, not response headers.
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
java/org/apache/coyote/Response.java | 7 +++++--
test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java | 4 ++--
2 files changed, 7 insertions(+), 4 deletions(-)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[tomcat] 02/02: Better variable name. These are request headers,
not response headers.
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 174fa5679b401bfbff11392dac01a6f662ddf700
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Mar 22 16:16:44 2021 +0000
Better variable name. These are request headers, not response headers.
---
test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java b/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java
index 738b2aa..a4eaddc 100644
--- a/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java
+++ b/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java
@@ -127,9 +127,9 @@ public class TestNonBlockingAPI extends TomcatBaseTest {
tomcat.start();
- Map<String, List<String>> resHeaders = new HashMap<>();
+ Map<String, List<String>> reqHeaders = new HashMap<>();
int rc = postUrl(true, new DataWriter(async ? 0 : 500, async ? 2000000 : 5),
- "http://localhost:" + getPort() + "/", new ByteChunk(), resHeaders, null);
+ "http://localhost:" + getPort() + "/", new ByteChunk(), reqHeaders, null);
Assert.assertEquals(HttpServletResponse.SC_OK, rc);
if (async) {
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[tomcat] 01/02: Cosmetic clean-up. Better comments.
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit b87bb5f4b96dc70e2421881413a9335069e416b4
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Mar 22 16:16:03 2021 +0000
Cosmetic clean-up. Better comments.
---
java/org/apache/coyote/Response.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/java/org/apache/coyote/Response.java b/java/org/apache/coyote/Response.java
index 65fc3c7..99d3324 100644
--- a/java/org/apache/coyote/Response.java
+++ b/java/org/apache/coyote/Response.java
@@ -51,9 +51,9 @@ import org.apache.tomcat.util.res.StringManager;
public final class Response {
private static final StringManager sm = StringManager.getManager(Response.class);
-
private static final Log log = LogFactory.getLog(Response.class);
+
// ----------------------------------------------------- Class Variables
/**
@@ -686,13 +686,16 @@ public final class Response {
* need access to state.
*/
volatile WriteListener listener;
+ // Ensures listener is only fired after a call is isReady()
private boolean fireListener = false;
+ // Tracks write registration to prevent duplicate registrations
private boolean registeredForWrite = false;
+ // Lock used to manage concurrent access to above flags
private final Object nonBlockingStateLock = new Object();
public WriteListener getWriteListener() {
return listener;
-}
+ }
public void setWriteListener(WriteListener listener) {
if (listener == null) {
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org