httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1124979 - in /httpd/httpd/trunk: CHANGES docs/manual/mod/mod_proxy_scgi.xml modules/proxy/mod_proxy_scgi.c
Date Thu, 19 May 2011 15:58:15 GMT
Author: jim
Date: Thu May 19 15:58:15 2011
New Revision: 1124979

URL: http://svn.apache.org/viewvc?rev=1124979&view=rev
Log:
Add in proxy-scgi-pathinfo and proxy-fcgi-pathinfo envvars
to allow "best guess" calculation of PATH_INFO for backend
FCGI/SCGI servers

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

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1124979&r1=1124978&r2=1124979&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Thu May 19 15:58:15 2011
@@ -2,6 +2,10 @@
 
 Changes with Apache 2.3.13
 
+  *) mod_proxy_fcgi|scgi: Add support for "best guess" of PATH_INFO
+     for SCGI/FCGI. PR 50880, 50851. [Mark Montague <mark catseye.org>,
+     Jim Jagielski]
+
   *) mod_cache: When content is served stale, and there is no means to
      revalidate the content using ETag or Last-Modified, and we have
      mandated no stale-on-error behaviour, stand down and don't cache.

Modified: httpd/httpd/trunk/docs/manual/mod/mod_proxy_scgi.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mod_proxy_scgi.xml?rev=1124979&r1=1124978&r2=1124979&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/mod_proxy_scgi.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/mod_proxy_scgi.xml Thu May 19 15:58:15 2011
@@ -75,6 +75,22 @@
     </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 SCGI protocol
+    provider:</p>
+    <dl>
+        <dt>proxy-scgi-pathinfo</dt>
+        <dd>By default <module>mod_proxy_scgi</module> will neither create
+        nor export the <var>PATH_INFO</var> environment variable. This allows
+        the backend SCGI 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_scgi</module> to generate
+        a "best guess" for <var>PATH_INFO</var>, set this env-var.</dd>
+    </dl>
+</section>
+
 <directivesynopsis>
 <name>ProxySCGISendfile</name>
 <description>Enable evaluation of <var>X-Sendfile</var> pseudo response

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_scgi.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_scgi.c?rev=1124979&r1=1124978&r2=1124979&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_scgi.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_scgi.c Thu May 19 15:58:15 2011
@@ -204,7 +204,11 @@ static int scgi_canon(request_rec *r, ch
 
     r->filename = apr_pstrcat(r->pool, "proxy:" SCHEME "://", host, sport, "/",
                               path, NULL);
-    r->path_info = apr_pstrcat(r->pool, "/", path, NULL);
+
+    if (apr_table_get(r->subprocess_env, "proxy-scgi-pathinfo")) {
+        r->path_info = apr_pstrcat(r->pool, "/", path, NULL);
+    }
+
     return OK;
 }
 



Mime
View raw message