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

markt-asf pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
     new 6d2123627d Clear per request error marker when request is recycled
6d2123627d is described below

commit 6d2123627d6a27e0f1c6525f53e91c35141706f7
Author: Mark Thomas <[email protected]>
AuthorDate: Mon Aug 24 17:18:31 2026 +0100

    Clear per request error marker when request is recycled
---
 java/org/apache/coyote/http2/StreamProcessor.java | 4 ++--
 webapps/docs/changelog.xml                        | 4 ++++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/coyote/http2/StreamProcessor.java 
b/java/org/apache/coyote/http2/StreamProcessor.java
index 47ae34dee7..a7c3062c9c 100644
--- a/java/org/apache/coyote/http2/StreamProcessor.java
+++ b/java/org/apache/coyote/http2/StreamProcessor.java
@@ -153,6 +153,8 @@ class StreamProcessor extends AbstractProcessor implements 
NonPipeliningProcesso
                          * statistics updating in StreamProcessor.recycle() 
needs to happen before the request and
                          * response are added to the pool to avoid concurrency 
issues corrupting the statistics.
                          */
+                        // Notes are not reset when request is recycled but 
this is a per request note
+                        request.setNote(Request.NOTE_BAD_REQUEST, null);
                         recycle();
                         stream.recycle();
                     }
@@ -506,8 +508,6 @@ class StreamProcessor extends AbstractProcessor implements 
NonPipeliningProcesso
         // - invalid (incorrectly formatted) :authority header
         // - invalid (incorrectly formatted) host header
         if (request.getNote(Request.NOTE_BAD_REQUEST) != null) {
-            // Notes not reset when request is recycled
-            request.setNote(Request.NOTE_BAD_REQUEST, null);
             return false;
         }
 
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index c21a7b0cac..d2a8b8931b 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -416,6 +416,10 @@
         Reject HTTP/1.0 requests that send a <code>transfer-encoding</code>
         header. (markt)
       </fix>
+      <fix>
+        Ensure per request HTTP/2 bad request marker is cleared when the 
request
+        is recycled. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Jasper">


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to