This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push:
new 4ac5da0906 Clear per request error marker when request is recycled
4ac5da0906 is described below
commit 4ac5da0906c500f6042844d7f17e9fb174820758
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 b272f2c6bc..f00ad7c59e 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();
}
@@ -523,8 +525,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 e0d10ec855..b185fb7c33 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -245,6 +245,10 @@
Reject HTTP/1.0 or earlier 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]