https://bz.apache.org/bugzilla/show_bug.cgi?id=69850
Bug ID: 69850
Summary: Http Delete Method is resolved as Options
Product: Tomcat 11
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: blocker
Priority: P2
Component: Connectors
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: -------
In version 11.0.12, the following error occurs:
Requests with the HTTP method DELETE are incorrectly translated to the HTTP
method OPTIONS.
The error is likely in `org.apache.coyote.ajp.Constant#methodTransArray`.
In version 11.0.11, the following is defined:
private static final String[] methodTransArray =
{ "OPTIONS", "GET", "HEAD", "POST", "PUT", "DELETE", "TRACE",
"PROPFIND", "PROPPATCH", "MKCOL", "COPY",
"MOVE", "LOCK", "UNLOCK", "ACL", "REPORT", "VERSION-CONTROL",
"CHECKIN", "CHECKOUT", "UNCHECKOUT",
"SEARCH", "MKWORKSPACE", "UPDATE", "LABEL", "MERGE",
"BASELINE-CONTROL", "MKACTIVITY" };
In version 11.0.12, however:
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.MOVE,
Method.LOCK, Method.UNLOCK, "ACL", "REPORT",
"VERSION-CONTROL", "CHECKIN", "CHECKOUT", "UNCHECKOUT", "SEARCH",
"MKWORKSPACE", "UPDATE", "LABEL",
"MERGE", "BASELINE-CONTROL", "MKACTIVITY" };
In `org.apache.coyote.ajp.AjpProcessor#prepareRequest` line 645:
if (methodCode != Constants.SC_M_JK_STORED) {
String methodName = Constants.getMethodForCode(methodCode - 1);
request.setMethod(methodName);
}
Now, for `methodCode` 6, OPTIONS is determined. This causes a request with the
HTTP method DELETE to no longer be executable.
Expected: DELETE
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]