-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Mark,

On 9/12/14 8:36 PM, Mark Eggers wrote:
> Here was my naive thought. haven't tested this yet (may be a
> project for this weekend).
> 
> Outside of a <Location> or <LocatioMatch> directive, the JkMount 
> directive parses the configured URL prefix. If requested URL
> passes the rules, then mod_jk gets to handle the request.
> 
> Inside of <Location> or <LocationMatch>, things are a bit
> different. Apache HTTPD parses the incoming request. If the
> requested URL passes, then it's sent along to whatever is inside of
> the directive.
> 
> So you can think of a JkMount wrapped in a <Location> or 
> <LocationMatch> directive as a 'dynamic' JkMount. It gets
> rewritten with whatever passes the <Location> or <LocationMatch>
> directives.

mod_jk must modify its own internal map of URL (patterns) -> workers
when it finds a one-argument JkMount within a <Location>. Simply using
Set-Handler is not quite enough: you have to use JkMount (or set
JK_WORKER_NAME - or whatever you set with JkWorkerIndicator),
otherwise mod_jk will have no idea how to route the request.

So, if mod_jk were to skip the URL-matching and rely on httpd's
<Location> (or whatever construct) and Set-Handler, it would also
require that JkMount [workerName] (or SetEnv JK_WORKER_NAME
[workerName)] also be present.

I would imagine that, at configuration time, it would be difficult to
determine if all of these things requirements have been met. At
request-time, it would be easy to tell if things were okay, but then
you may have a bit of confusion by users who haven't quite configured
things properly and get a different default behavior then they were
expecting.

> Something like:
> 
> JkMount [i-made-it-inside] worker
> 
> At least that was my understanding. And yes, the documentation is
> not so clear.
> 
> It doesn't seem to me that obvious that JkMount would somehow read
> the parameter from <Location> or <LocationMatch> and use that in a 
> configuration such as:
> 
> JkMount /*faddle.jsp$ worker
> 
> Especially since that regular expression would make no since to
> JkMount.

Correct. It's perfectly reasonable to do something like this:

<Location "~/.*/abc/*.exe">
   JkMount workerX
</Location>

... and have a URL pattern that mod_jk has no idea how to handle.

It's starting to sound more and more like mod_jk should just not try
to over-think things and re-evaluate URLs, etc: it needs a mode where
it will take the worker name from JkMount (or Set-Handler) and just
use it without checking the URL. On the other hand, I'm not sure how
mod_jk can detect (during a request) when it's being called from
"within a <Location>". You may have to set some other environment
variable to disable mod_jk's URL (re)evaluation logic.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUFu4DAAoJEBzwKT+lPKRY6MYP/iU0iCDHoAtGNk7PqD40MJAG
BNGsyc5iaecc+Zs5z6Bq+XAqz5U5ytQt0eJVCL2uw0mFGo+dVmNmiD5IukyNDV2+
YAs9zhAfY5rEAEBssR/KiQkAapnfXN5VQQn80PVSyIwfMqrl3HDuH/kf9xZ66F9v
c45szWJHdnAAe+xxp1oI7JHnoZMgROJdwdr7/kwZ2eX6YpjRMMPQ11mQ5mI4yfrZ
B5QbprxQA99Eg33rf6WJnTmHaLlj+df0j+BR+vF/vIta7U0qz4IpcIZXM4YYMOOj
8BjI0ei7Wbifv1xx+PW3mOAuFnZiTE8HZHddieiJEItwKqc4ZoioheQUsUfkATAt
fwCdl/Gj1Evr5kqPo4ybmyq05H9Pnt0d6AciKuPnd3GfT1Ia7oPY+Sxqro8SDBeq
47OpGqZHk4tAdH4er2jxO2AkobdkYplv3gtcc5v5VtgToieMsB5TADRByTp1B4gh
WK8pQbw8jEDBoeJYE73bwcbHS6H6TqmVkhgniB8cmawKi3b4zrahf2dlEKgRwswV
/BOYvqomL/XJUKo8DEiDzTMProjSIjNQD1KkATnUBxkw+vZqvYX7fM33jUTLmJCh
wyxKa/MJaJMMRj8FsDZb1D2zJgRestaq/P1N2Bh5nvn9MWb8WbETGQM7wkdMbGx8
84XtqKiDng6zqSBCCr6o
=W6ig
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to