]> granicus.if.org Git - apache/commitdiff
tweak SCRIPT_FILENAME passed to fastcgi backends when a balancer is used.
authorEric Covener <covener@apache.org>
Fri, 19 Dec 2014 14:03:52 +0000 (14:03 +0000)
committerEric Covener <covener@apache.org>
Fri, 19 Dec 2014 14:03:52 +0000 (14:03 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1646724 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/proxy/mod_proxy_fcgi.c

diff --git a/CHANGES b/CHANGES
index 05541f82a6dd92e1e8fb46fb476e5dabf9ae36d7..c5fd33792bf8174846a8220e7ab3a67d5a8a5b03 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
 
+  *) mod_proxy_fcgi: Remove proxy:balancer:// prefix from SCRIPT_FILENAME
+     passed to fastcgi backends. [Eric Covener]
+
   *) mod_http: Fix incorrect If-Match handling. PR 57358
      [Kunihiko Sakamoto <ksakamoto google.com>]
 
index 9b20a9f550ff4229e76ffda09e8da0978b74177e..f53eb0e008c330e59adbf3cf5850136dd3fee16f 100644 (file)
@@ -206,9 +206,20 @@ static apr_status_t send_environment(proxy_conn_rec *conn, request_rec *r,
     apr_status_t rv;
     apr_size_t avail_len, len, required_len;
     int next_elem, starting_elem;
+    char *proxyfilename = r->filename;
+
+    /* Strip balancer prefix */
+    if (r->filename && !strncmp(r->filename, "proxy:balancer://", 17)) { 
+        char *newfname = apr_pstrdup(r->pool, r->filename);
+        newfname += 17; 
+        newfname = ap_strchr(newfname, '/');
+        r->filename  = newfname;
+    }
 
     ap_add_common_vars(r);
     ap_add_cgi_vars(r);
+    r->filename = proxyfilename;
 
     /* XXX are there any FastCGI specific env vars we need to send? */