Return-Path: Delivered-To: apmail-httpd-modules-dev-archive@locus.apache.org Received: (qmail 19678 invoked from network); 18 Sep 2007 17:43:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Sep 2007 17:43:47 -0000 Received: (qmail 56952 invoked by uid 500); 18 Sep 2007 17:43:39 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 56934 invoked by uid 500); 18 Sep 2007 17:43:38 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 56925 invoked by uid 99); 18 Sep 2007 17:43:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Sep 2007 10:43:38 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of vpetrucci@gmail.com designates 64.233.184.227 as permitted sender) Received: from [64.233.184.227] (HELO wr-out-0506.google.com) (64.233.184.227) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Sep 2007 17:43:37 +0000 Received: by wr-out-0506.google.com with SMTP id 50so821603wra for ; Tue, 18 Sep 2007 10:43:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=y0oW84B9ZJdU7wqnmwuSMoaVLV6Jq8qxBrnPduQaHXo=; b=poFnFihFQbwQNMXdkZdjm3foLqUytFREXjqmAI/ilrFJ4mC7TgVrFyRqFxUWF7FX9txfaMuX/DVl67ekxz/1AZrv07k/5z4P6CE3oRKD6X+mBPFplXnJucOSw8wglihdewE5wkEueOYx3ti9NclQt84J6oYGZuPWOT+XoBUDScU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=liliQwcRbdQ+H/OE/46zR1jnQix77Z4BHvY9r+BCtf1Xn3NymHEPVlao6vVWkiXsRwXUqQiqYTi+vN70KeCCAlY7ZMXz+ohyvKQGC73LoaKpOJcruKwDA1EnI1taC1Kqoq3wrH/Jkeo96aE4tEUpKGKvRruLqoSKOcT1bfAViXw= Received: by 10.142.48.14 with SMTP id v14mr1655571wfv.1190137394178; Tue, 18 Sep 2007 10:43:14 -0700 (PDT) Received: by 10.143.44.8 with HTTP; Tue, 18 Sep 2007 10:43:14 -0700 (PDT) Message-ID: <14ee094e0709181043n1cd05737gcaa4db44092e721d@mail.gmail.com> Date: Tue, 18 Sep 2007 14:43:14 -0300 From: "Vinicius Petrucci" Sender: vpetrucci@gmail.com To: modules-dev@httpd.apache.org Subject: hook - pre_request In-Reply-To: <14ee094e0709131413h2231c6d1k7ac923682c73092f@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <14ee094e0709131413h2231c6d1k7ac923682c73092f@mail.gmail.com> X-Google-Sender-Auth: e914f09d3ae5a53d X-Virus-Checked: Checked by ClamAV on apache.org 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