Bug 51743 - Allow using of rule extension when using handler with mod_rewrite
Summary: Allow using of rule extension when using handler with mod_rewrite
Status: RESOLVED FIXED
Alias: None
Product: Tomcat Connectors
Classification: Unclassified
Component: mod_jk (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 enhancement (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-30 07:43 UTC by Ryszard Łach
Modified: 2011-10-23 20:13 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryszard Łach 2011-08-30 07:43:01 UTC
Hi.

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.

Cheers,

Ryszard.
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.

Regards,

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