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:33:15 UTC

[tomcat] branch 8.5.x updated (21df62a -> aabee09)

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

markt pushed a change to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


    from 21df62a  Avoid reflection use for classloader configuration
     new 717707b  Cosmetic clean-up. Better comments.
     new aabee09  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 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit aabee092ded7d043a61bdbee5e39209872b4ecd1
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 6217083..939d20d 100644
--- a/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java
+++ b/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java
@@ -126,9 +126,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 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 717707b2e27603d9d3a27a24c0e67be727b4f0d4
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 bd87ce9..6a6c787 100644
--- a/java/org/apache/coyote/Response.java
+++ b/java/org/apache/coyote/Response.java
@@ -49,9 +49,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
 
     /**
@@ -667,13 +667,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