From: Garrett Rooney Date: Sun, 5 Mar 2006 07:08:28 +0000 (+0000) Subject: Fix up the path info in the balancer backend just like we do in the X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77088eff2a5b5e62bbc01806a204e094d36d25ba;p=thirdparty%2Fapache%2Fhttpd.git 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 --- diff --git a/modules/proxy/mod_proxy_balancer.c b/modules/proxy/mod_proxy_balancer.c index def1919254d..8a9771edaf9 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 d42c10eb977..8917986e6cb 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,