httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cove...@apache.org
Subject svn commit: r1646724 - in /httpd/httpd/trunk: CHANGES modules/proxy/mod_proxy_fcgi.c
Date Fri, 19 Dec 2014 14:03:52 GMT
Author: covener
Date: Fri Dec 19 14:03:52 2014
New Revision: 1646724

URL: http://svn.apache.org/r1646724
Log:
tweak SCRIPT_FILENAME passed to fastcgi backends when a balancer is used.


Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1646724&r1=1646723&r2=1646724&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Fri Dec 19 14:03:52 2014
@@ -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>]
 

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c?rev=1646724&r1=1646723&r2=1646724&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c Fri Dec 19 14:03:52 2014
@@ -206,9 +206,20 @@ static apr_status_t send_environment(pro
     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? */
 



Mime
View raw message