]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Fix up the path info in the balancer backend just like we do in the
authorGarrett Rooney <rooneg@apache.org>
Sun, 5 Mar 2006 07:08:28 +0000 (07:08 +0000)
committerGarrett Rooney <rooneg@apache.org>
Sun, 5 Mar 2006 07:08:28 +0000 (07:08 +0000)
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

modules/proxy/mod_proxy_balancer.c
modules/proxy/mod_proxy_fcgi.c

index def1919254def86a9f578025ec9fbff1fdfce9df..8a9771edaf9abf4f671aadbafbc062776f90b50c 100644 (file)
@@ -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;
 }
 
index d42c10eb977d99b0398b889912890f1397cb0ef5..8917986e6cb615da9661f15783e4e173d47c4b88 100644 (file)
@@ -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,