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 Suneet Shah <su...@gmail.com> on 2011/09/11 20:11:52 UTC
Mod-Proxy and related modules
Hello,
I am trying to proxy to an application that was built with Google Web
Toolkit and am trying to see if I can use the existing proxy functionality
that is provided with Apache will work if I need to extend or build a new
module.
The application makes an RPC call that contains a payload. Is it possible
to:
- Log the payload?
- Is it possible to modify the payload?
For example:
A payload may come in as 6|0|6|http://localhost:9080/
But it should be 6|0|6|http://localhost:9080/test_rpc
If we cant do it using something like mod-rewrite, would it be possible to
get some guidance as to where I can look in the code to mod_proxy code to
potentially modify this?
thanks in advance for your help
Suneet
Re: Mod-Proxy and related modules
Posted by alin vasile <al...@yahoo.com>.
I managed to get the forwarded url in r->notes by using a hook in mod_proxy:
proxy_hook_pre_request(pre_proxy_request, NULL, NULL, APR_HOOK_FIRST);
int pre_proxy_request(proxy_worker **worker,
proxy_balancer **balancer,
request_rec *r,
proxy_server_conf *conf, char **url) {
apr_table_set(r->notes, "MY_FORWARD_URL" , apr_pstrdup(r->pool, url));
return DECLINED;
}
Hope this helps.
________________________________
From: Suneet Shah <su...@gmail.com>
To: modules-dev@httpd.apache.org
Sent: Sunday, September 11, 2011 9:11 PM
Subject: Mod-Proxy and related modules
Hello,
I am trying to proxy to an application that was built with Google Web
Toolkit and am trying to see if I can use the existing proxy functionality
that is provided with Apache will work if I need to extend or build a new
module.
The application makes an RPC call that contains a payload. Is it possible
to:
- Log the payload?
- Is it possible to modify the payload?
For example:
A payload may come in as 6|0|6|http://localhost:9080/
But it should be 6|0|6|http://localhost:9080/test_rpc
If we cant do it using something like mod-rewrite, would it be possible to
get some guidance as to where I can look in the code to mod_proxy code to
potentially modify this?
thanks in advance for your help
Suneet