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 d60fa0283b Fix BZ 69848 - Correct copy/paste error when refactoring
method names
d60fa0283b is described below
commit d60fa0283b3956b20fa0ba5ea4866e728c87be84
Author: Mark Thomas <[email protected]>
AuthorDate: Fri Oct 10 08:48:33 2025 +0100
Fix BZ 69848 - Correct copy/paste error when refactoring method names
https://bz.apache.org/bugzilla/show_bug.cgi?id=69848
---
java/org/apache/coyote/ajp/Constants.java | 2 +-
test/org/apache/catalina/realm/TestRealmBase.java | 4 ++--
webapps/docs/changelog.xml | 9 +++++++++
3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/java/org/apache/coyote/ajp/Constants.java
b/java/org/apache/coyote/ajp/Constants.java
index 1a544763da..6549a226a8 100644
--- a/java/org/apache/coyote/ajp/Constants.java
+++ b/java/org/apache/coyote/ajp/Constants.java
@@ -105,7 +105,7 @@ public final class Constants {
// Translates integer codes to names of HTTP methods
private static final String[] methodTransArray =
- { Method.OPTIONS, Method.GET, Method.HEAD, Method.POST,
Method.PUT, Method.OPTIONS, Method.TRACE, Method.TRACE, Method.PROPPATCH,
Method.MKCOL, Method.COPY,
+ { Method.OPTIONS, Method.GET, Method.HEAD, Method.POST,
Method.PUT, Method.DELETE, Method.TRACE, Method.TRACE, Method.PROPPATCH,
Method.MKCOL, Method.COPY,
Method.MOVE, Method.LOCK, Method.UNLOCK, "ACL", "REPORT",
"VERSION-CONTROL", "CHECKIN", "CHECKOUT", "UNCHECKOUT",
"SEARCH", "MKWORKSPACE", "UPDATE", "LABEL", "MERGE",
"BASELINE-CONTROL", "MKACTIVITY" };
diff --git a/test/org/apache/catalina/realm/TestRealmBase.java
b/test/org/apache/catalina/realm/TestRealmBase.java
index 894d3e5625..fe14325f79 100644
--- a/test/org/apache/catalina/realm/TestRealmBase.java
+++ b/test/org/apache/catalina/realm/TestRealmBase.java
@@ -660,7 +660,7 @@ public class TestRealmBase {
SecurityConstraint deleteConstraint = new SecurityConstraint();
deleteConstraint.addAuthRole(ROLE1);
SecurityCollection deleteCollection = new SecurityCollection();
- deleteCollection.addMethod(Method.OPTIONS);
+ deleteCollection.addMethod(Method.DELETE);
deleteCollection.addPatternDecoded("/*");
deleteConstraint.addCollection(deleteCollection);
@@ -772,7 +772,7 @@ public class TestRealmBase {
// Only user1 should be able to perform a DELETE as only that user has
// role1.
- request.setMethod(Method.OPTIONS);
+ request.setMethod(Method.DELETE);
SecurityConstraint[] constraintsDelete =
mapRealm.findSecurityConstraints(request, context);
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 19ccb21bc3..3d37885468 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -131,6 +131,15 @@
</fix>
</changelog>
</subsection>
+ <subsection name="Coyote">
+ <changelog>
+ <fix>
+ <bug>69848</bug>: Fix copy/paste error in 11.0.12 that meant DELETE
+ requests received via the AJP connector were processed as OPTIONS
+ requests. (markt)
+ </fix>
+ </changelog>
+ </subsection>
<subsection name="WebSocket">
<changelog>
<fix>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]