Commit 7485d862 authored by Garrett Rooney's avatar Garrett Rooney
Browse files

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
parent 9e0d86da
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;
}

+0 −5
Original line number Diff line number Diff line
@@ -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,