Perrin Harkins wrote:
On 9/24/07, André Warnier <[EMAIL PROTECTED]> wrote:
My::module would do something (or not) to the request, then it should
let the (possibly modified) request go through, so that the mod_jk
module can intercept it and re-direct it to Tomcat.

Your should write your code as an input filter then, not a response handler.


Sorry, I was not quite clear in what I meant by "modifying the request". I meant modifying stuff like the incoming HTTP headers or the URI, not the content.

From what I understand of the documentation, by the time we get to the input filter, we are already at the Response stage, which means all the stuff about interpreting the headers, and assigning the request to mod_jk, is already done. No ? I get the impression that the input filter, contrary to handlers, is a kind of "pull" module : it is invoked when (in this case) mod_jk reads the request content, and gets to see (and possibly modify) the input stream (buckets) of mod_jk on-the-fly. Can an input filter then still modify the request, in the sense for example of changing the request URI or adding/modifying incoming request HTTP headers, or is it then too late for that ?

But assuming it can, there is another area which is still not clear to me. I realise that this is not a specifically mod_perl question, but would anyone happen to know ?

The mod_jk "re-direction" is specified in httpd.conf by the following kind of config lines :

<IfModule mod_jk.c>
    JkMount /xyz ajp13
    JkMount /xyz/* ajp13
</IfModule>

That seems like a "server-level" specification, outside of any <Location> or <Directory> section. On the other hand, a PerlInputFilterHandler is a Directory-level specification. How would I specify a mod_perl input filter for those same URI's ? I don't know how to express this more clearly. I guess it would be clearer if the mod_jk directives were expressed as
<Location /xyz>
  JkMount ajp13
</Location>
and I could just insert the PerlInputFilterHandler in that same section,
but that's not how the mod_jk documentation says to do it.

aw

Reply via email to