You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modules-dev@httpd.apache.org by Vinicius Petrucci <vp...@ic.uff.br> on 2007/09/18 19:43:14 UTC
hook - pre_request
Hi,
I need a hook function that looks at pre_request (also post) phase
after the rewriting phase of worker's URL (e.g.,
http://worker2.com/test.php) to use the name of the worker for my own
propose.
I tried to put this way:
static const char * const aszPre[]={ "mod_proxy_balancer.c", NULL };
proxy_hook_pre_request(my_pre_request, aszPre, NULL, APR_HOOK_LAST);
But the proxy_pre_request function in mod_proxy_balance returns OK,
and my function is nerver called. There's a better way to do this
without touching in apache internal source-code?
Putting in more details... look at this log information:
[Thu Sep 13 18:15:58 2007] [debug] mod_proxy_balancer.c(42): proxy:
BALANCER: canonicalising URL //mycluster/
[Thu Sep 13 18:15:58 2007] [debug] mod_proxy_balancer.c(274): proxy:
BALANCER: Found value (null) for stickysession BALANCEID
[Thu Sep 13 18:15:58 2007] [debug] mod_proxy_balancer.c(962): proxy:
Entering byrequests for BALANCER (balancer://mycluster)
[Thu Sep 13 18:15:58 2007] [debug] mod_proxy_balancer.c(533): proxy:
BALANCER (balancer://mycluster) worker (http://putiri.ic.uff.br)
rewritten to http://putiri.ic.uff.br/
*** (I NEED A HOOK HERE)
[Thu Sep 13 18:15:58 2007] [debug] mod_proxy.c(819): Running scheme
balancer handler (attempt 0)
*** (OR HERE ... ?)
[Thu Sep 13 18:15:58 2007] [debug] mod_proxy_http.c(1693): proxy:
HTTP: serving URL http://putiri.ic.uff.br/
[Thu Sep 13 18:15:58 2007] [debug] proxy_util.c(1852): proxy: HTTP:
has acquired connection for (putiri.ic.uff.br)
[Thu Sep 13 18:15:58 2007] [debug] proxy_util.c(1913): proxy:
connecting http://putiri.ic.uff.br/ to putiri.ic.uff.br:80
[Thu Sep 13 18:15:58 2007] [debug] proxy_util.c(2012): proxy:
connected / to putiri.ic.uff.br:80
[Thu Sep 13 18:15:58 2007] [debug] proxy_util.c(2169): proxy: HTTP:
fam 2 socket created to connect to putiri.ic.uff.br
[Thu Sep 13 18:15:58 2007] [debug] proxy_util.c(2266): proxy: HTTP:
connection complete to 200.20.15.226:80 (putiri.ic.uff.br)
[Thu Sep 13 18:15:58 2007] [debug] mod_proxy_http.c(1478): proxy:
start body send
[Thu Sep 13 18:15:58 2007] [debug] mod_proxy_http.c(1567): proxy: end body send
[Thu Sep 13 18:15:58 2007] [debug] proxy_util.c(1870): proxy: HTTP:
has released connection for (putiri.ic.uff.br)
[Thu Sep 13 18:15:58 2007] [debug] mod_proxy_balancer.c(561):
proxy_balancer_post_request for (balancer://mycluster)
*** (ALSO I NEED A POST HOOK HERE, i think this is easier... )
Thanks in advance.
--
Vinicius Tavares Petrucci
home page: http://www.ic.uff.br/~vpetrucci
--
Vinicius Tavares Petrucci
home page: http://www.ic.uff.br/~vpetrucci