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

markt 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 3e2461ccda Fix additional uses of Request.method() in 10.1.x and 
earlier
3e2461ccda is described below

commit 3e2461ccda36c1ebf021dfcf38a18a142711b3ae
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Sep 11 09:58:06 2025 +0100

    Fix additional uses of Request.method() in 10.1.x and earlier
---
 java/org/apache/catalina/core/ApplicationPushBuilder.java | 2 +-
 java/org/apache/coyote/http2/Stream.java                  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/core/ApplicationPushBuilder.java 
b/java/org/apache/catalina/core/ApplicationPushBuilder.java
index 90250326ac..7925ffd69d 100644
--- a/java/org/apache/catalina/core/ApplicationPushBuilder.java
+++ b/java/org/apache/catalina/core/ApplicationPushBuilder.java
@@ -293,7 +293,7 @@ public class ApplicationPushBuilder implements PushBuilder {
 
         org.apache.coyote.Request pushTarget = new org.apache.coyote.Request();
 
-        pushTarget.method().setString(method);
+        pushTarget.setMethod(method);
         // The next three are implied by the Javadoc getPath()
         pushTarget.serverName().setString(baseRequest.getServerName());
         pushTarget.setServerPort(baseRequest.getServerPort());
diff --git a/java/org/apache/coyote/http2/Stream.java 
b/java/org/apache/coyote/http2/Stream.java
index 51afc13d1a..f56a2cef62 100644
--- a/java/org/apache/coyote/http2/Stream.java
+++ b/java/org/apache/coyote/http2/Stream.java
@@ -862,7 +862,7 @@ class Stream extends AbstractNonZeroStream implements 
HeaderEmitter {
             return;
         }
         // Set the special HTTP/2 headers
-        
request.getMimeHeaders().addValue(":method").duplicate(request.method());
+        
request.getMimeHeaders().addValue(":method").setString(request.getMethod());
         
request.getMimeHeaders().addValue(":scheme").duplicate(request.scheme());
         StringBuilder path = new 
StringBuilder(request.requestURI().toString());
         if (!request.queryString().isNull()) {


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

Reply via email to