Summary: | "OPTIONS *" brothers common/jk_util.c:jk_servlet_normalize | ||
---|---|---|---|
Product: | Tomcat Connectors | Reporter: | lzsiga <lzsiga> |
Component: | mod_jk | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | trivial | ||
Priority: | P2 | ||
Version: | 1.2.44 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Attachments: | apache-2.0/mod_jk.c patch |
It should be possible to pass an OPTIONS request to the back-end. jk_servlet_normalize needs to allow it as a special case. Thanks for the report and the patch. It prompted some useful additional review / clean-up and a slightly different solution was adopted. The fix will be included in 1.2.45 onwards which - given this regression - should be fairly soon. |
Created attachment 36136 [details] apache-2.0/mod_jk.c patch In the latest 'mod_jk' version (1.2.44) new function 'common/jk_utilversion.jk_servlet_normalize ' rejects "*" (from "OPTIONS *") as invalid resource, as it doesn't start with a /slash: [emerg] jk_servlet_normalize::jk_util.c (2188): [*] does not start with '/'. jk_servlet_normalize is called by apache-2.0/mod_jk.c:jk_translate (line 3799) I think there should be an exception for this special case; I guess mod_jk should completely ignore "OPTIONS *", something like this: --- mod_jk.orig.c 2018-08-24 16:42:42.000000000 +0200 +++ mod_jk.c 2018-09-07 11:27:45.637798286 +0200 @@ -3765,6 +3765,7 @@ rconf->rule_extensions = NULL; ap_set_module_config(r->request_config, &jk_module, rconf); + if (r->method_number==M_OPTIONS && strcmp (r->uri, "*")==0) return DECLINED; if (!r->proxyreq) { jk_server_conf_t *conf = (jk_server_conf_t *) ap_get_module_config(r->server->