diff options
author | Garrett Rooney <rooneg@apache.org> | 2006-03-05 07:08:28 +0000 |
---|---|---|
committer | Garrett Rooney <rooneg@apache.org> | 2006-03-05 07:08:28 +0000 |
commit | 77088eff2a5b5e62bbc01806a204e094d36d25ba (patch) | |
tree | 22deed399762e52be2365542541944a0a4deef57 | |
parent | d215e258b8a29d1b40d6bb5be8a22d53623b064c (diff) | |
download | httpd-77088eff2a5b5e62bbc01806a204e094d36d25ba.tar.gz |
Fix up the path info in the balancer backend just like we do in the
fcgi backend. This lets Rails apps work under a balancer setup without
any hacks to Rails itself.
* modules/proxy/mod_proxy_balancer.c
(proxy_balancer_canon): Set r->path_info based on the path we got
from parsing the URL.
* modules/proxy/mod_proxy_fcgi.c
(proxy_fcgi_canon): Remove the comment about balancer not setting
the path_info.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/fcgi-proxy-dev@383291 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | modules/proxy/mod_proxy_balancer.c | 3 | ||||
-rw-r--r-- | modules/proxy/mod_proxy_fcgi.c | 5 |
2 files changed, 3 insertions, 5 deletions
diff --git a/modules/proxy/mod_proxy_balancer.c b/modules/proxy/mod_proxy_balancer.c index def1919254..8a9771edaf 100644 --- a/modules/proxy/mod_proxy_balancer.c +++ b/modules/proxy/mod_proxy_balancer.c @@ -71,6 +71,9 @@ static int proxy_balancer_canon(request_rec *r, char *url) r->filename = apr_pstrcat(r->pool, "proxy:balancer://", host, "/", path, (search) ? "?" : "", (search) ? search : "", NULL); + + r->path_info = apr_pstrcat(r->pool, "/", path, NULL); + return OK; } diff --git a/modules/proxy/mod_proxy_fcgi.c b/modules/proxy/mod_proxy_fcgi.c index d42c10eb97..8917986e6c 100644 --- a/modules/proxy/mod_proxy_fcgi.c +++ b/modules/proxy/mod_proxy_fcgi.c @@ -113,11 +113,6 @@ static int proxy_fcgi_canon(request_rec *r, char *url) ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "proxy: FCGI: set r->filename to %s", r->filename); - /* XXX NOTE: this isn't ever going to be called if we're in a balancer - * setup, so either we need someplace else to set this up, or the - * balancer code needs to do the same thing. As things stand you - * can't depend on the PATH_INFO being sent down to the back end. */ - r->path_info = apr_pstrcat(r->pool, "/", path, NULL); ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, |