httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1078089 - in /httpd/httpd/trunk: docs/manual/mod/mod_proxy_fcgi.xml modules/proxy/mod_proxy_fcgi.c
Date Fri, 04 Mar 2011 18:31:18 GMT
Author: jim
Date: Fri Mar  4 18:31:17 2011
New Revision: 1078089

URL: http://svn.apache.org/viewvc?rev=1078089&view=rev
Log:
Fix/workaround for BUGZ PR 50851.
By default, mod_proxy_fcgi with not create PATH_INFO, unless
specifically told to.

Modified:
    httpd/httpd/trunk/docs/manual/mod/mod_proxy_fcgi.xml
    httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c

Modified: httpd/httpd/trunk/docs/manual/mod/mod_proxy_fcgi.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mod_proxy_fcgi.xml?rev=1078089&r1=1078088&r2=1078089&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/mod_proxy_fcgi.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/mod_proxy_fcgi.xml Fri Mar  4 18:31:17 2011
@@ -96,4 +96,21 @@
     </example>
 </section>
 
+<section id="env"><title>Environment Variables</title>
+    <p>In addition to the configuration directives that control the
+    behaviour of <module>mod_proxy</module>, there are a number of
+    <dfn>environment variables</dfn> that control the FCGI protocol
+    provider:</p>
+    <dl>
+        <dt>proxy-fcgi-pathinfo</dt>
+        <dd>By default <module>mod_proxy_fcgi</module> will neither create
+        nor export the <var>PATH_INFO</var> environment variable. This allows
+        the backend FCGI server to correctly determine <var>SCRIPT_NAME</var>
+        and <var>Script-URI</var> and be compliant with RFC 3875 section 3.3.
+        If instead you need <module>mod_proxy_fcgi</module> to generate
+        a "best guess" for <var>PATH_INFO</var>, set this env-var.
+        This is a workaround for a bug in some FCGI implementations.</dd>
+    </dl>
+</section>
+
 </modulesynopsis>

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=1078089&r1=1078088&r2=1078089&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c Fri Mar  4 18:31:17 2011
@@ -119,10 +119,12 @@ static int proxy_fcgi_canon(request_rec 
     ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
                   "proxy: FCGI: set r->filename to %s", r->filename);
 
-    r->path_info = apr_pstrcat(r->pool, "/", path, NULL);
+    if (apr_table_get(r->subprocess_env, "proxy-fcgi-pathinfo")) {
+        r->path_info = apr_pstrcat(r->pool, "/", path, NULL);
 
-    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
-                  "proxy: FCGI: set r->path_info to %s", r->path_info);
+        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+                      "proxy: FCGI: set r->path_info to %s", r->path_info);
+    }
 
     return OK;
 }



Mime
View raw message