]> granicus.if.org Git - apache/commitdiff
Merge r1646724, r1650309 from trunk:
authorEric Covener <covener@apache.org>
Wed, 14 Jan 2015 13:24:10 +0000 (13:24 +0000)
committerEric Covener <covener@apache.org>
Wed, 14 Jan 2015 13:24:10 +0000 (13:24 +0000)
tweak SCRIPT_FILENAME passed to fastcgi backends when a balancer is used.

save some bytes per Christophe's review.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1651658 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/proxy/mod_proxy_fcgi.c

diff --git a/CHANGES b/CHANGES
index 00979716d46dca5b07568bd341438e062f416589..5b70a7dc96c88a25d671224bc6597859b06fa641 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -5,9 +5,6 @@ Changes with Apache 2.4.11
   *) SECURITY: CVE-2014-3583 (cve.mitre.org)
      mod_proxy_fcgi: Fix a potential crash due to buffer over-read, with 
      response headers' size above 8K.  [Yann Ylavic, Jeff Trawick]
-  *) event: Update the internal "connection id" when requests
-     move from thread to thread. Reuse can confuse modules like
-     mod_cgid. PR 57435. [Michael Thorpe <mike gistnet.com>]
 
   *) SECURITY: CVE-2014-3581 (cve.mitre.org)
      mod_cache: Avoid a crash when Content-Type has an empty value.
@@ -25,6 +22,9 @@ Changes with Apache 2.4.11
      request headers earlier.  Adds "MergeTrailers" directive to restore
      legacy behavior.  [Edward Lu, Yann Ylavic, Joe Orton, Eric Covener]
 
+  *) mod_proxy_fcgi: Remove proxy:balancer:// prefix from SCRIPT_FILENAME
+     passed to fastcgi backends. [Eric Covener]
+
   *) mod_ssl: Add support for extracting subjectAltName entries of type
      rfc822Name and dNSName into SSL_{CLIENT,SERVER}_SAN_{Email,DNS}_n
      environment variables. Also addresses PR 57207. [Kaspar Brand]
index a261b6762aa89fd40225c17c7034b4793130bbde..3079debf655d569306efd18ce0e6c85e46f62cba 100644 (file)
@@ -204,9 +204,19 @@ 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+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? */