Bug 51743

Summary: Allow using of rule extension when using handler with mod_rewrite
Product: Tomcat Connectors Reporter: Ryszard Łach <rylach>
Component: mod_jkAssignee: Tomcat Developers Mailing List <dev>
Severity: enhancement CC: rylach
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   

Description Ryszard Łach 2011-08-30 07:43:01 UTC

It is currently not possible to use rule extension with handlers and e.g. mod_rewrite. The rule

RewriteRule .*\.xml$ - [H=jakarta-servlet,E=JK_WORKER_NAME:lb;use_server_errors=404,L]

Causes an error

[info] jk_handler::mod_jk.c (2623): Could not find a worker for worker name=lb;use_server_errors=404

It would be nice to be able to set a rule extension in an JK_WORKER_NAME value.


Comment 1 Rainer Jung 2011-10-23 19:17:14 UTC
Interesting idea. Rule extensions were only meant to be used in uriworkermap.properties, and I was quite astonished when testing now, that they also work for JkMount.

In r1187950 I added support for their use when dynamically defining worker names using JK_WORKER_NAME.

Note that some rules need a comma in their value, which will result in a syntax error when used in a RewriteRule. You can instead use SetEnvIf if it suffices for your needs. Otherwise you are limited to the rules that don't need a comma.


Comment 2 Rainer Jung 2011-10-23 20:13:47 UTC
Forgot to mention it: will be part of version 1.2.33.