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 d4f7f427ec HTTP methods are case sensitive - use consistent code for testing method d4f7f427ec is described below commit d4f7f427ec31f5159ec6e23a3d319b5253f031bf Author: Mark Thomas <ma...@apache.org> AuthorDate: Mon Nov 6 16:10:24 2023 +0000 HTTP methods are case sensitive - use consistent code for testing method --- java/org/apache/catalina/connector/CoyoteAdapter.java | 6 +++--- java/org/apache/coyote/http2/Stream.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/java/org/apache/catalina/connector/CoyoteAdapter.java b/java/org/apache/catalina/connector/CoyoteAdapter.java index 471d2d6da4..f60c44d3be 100644 --- a/java/org/apache/catalina/connector/CoyoteAdapter.java +++ b/java/org/apache/catalina/connector/CoyoteAdapter.java @@ -591,7 +591,7 @@ public class CoyoteAdapter implements Adapter { // Check for ping OPTIONS * request if (undecodedURI.equals("*")) { - if (req.method().equalsIgnoreCase("OPTIONS")) { + if (req.method().equals("OPTIONS")) { StringBuilder allow = new StringBuilder(); allow.append("GET, HEAD, POST, PUT, DELETE, OPTIONS"); // Trace if allowed @@ -610,7 +610,7 @@ public class CoyoteAdapter implements Adapter { MessageBytes decodedURI = req.decodedURI(); // Filter CONNECT method - if (req.method().equalsIgnoreCase("CONNECT")) { + if (req.method().equals("CONNECT")) { response.sendError(HttpServletResponse.SC_NOT_IMPLEMENTED, sm.getString("coyoteAdapter.connect")); } else { // No URI for CONNECT requests @@ -809,7 +809,7 @@ public class CoyoteAdapter implements Adapter { } // Filter TRACE method - if (!connector.getAllowTrace() && req.method().equalsIgnoreCase("TRACE")) { + if (!connector.getAllowTrace() && req.method().equals("TRACE")) { Wrapper wrapper = request.getWrapper(); String header = null; if (wrapper != null) { diff --git a/java/org/apache/coyote/http2/Stream.java b/java/org/apache/coyote/http2/Stream.java index fbe67a6e69..eac438d25f 100644 --- a/java/org/apache/coyote/http2/Stream.java +++ b/java/org/apache/coyote/http2/Stream.java @@ -535,7 +535,7 @@ class Stream extends AbstractNonZeroStream implements HeaderEmitter { final boolean receivedEndOfHeaders() throws ConnectionException { if (coyoteRequest.method().isNull() || coyoteRequest.scheme().isNull() || - !coyoteRequest.method().equalsIgnoreCase("CONNECT") && coyoteRequest.requestURI().isNull()) { + !coyoteRequest.method().equals("CONNECT") && coyoteRequest.requestURI().isNull()) { throw new ConnectionException(sm.getString("stream.header.required", getConnectionId(), getIdAsString()), Http2Error.PROTOCOL_ERROR); } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org