]> granicus.if.org Git - apache/commitdiff
Add in proxy-scgi-pathinfo and proxy-fcgi-pathinfo envvars
authorJim Jagielski <jim@apache.org>
Thu, 19 May 2011 15:58:15 +0000 (15:58 +0000)
committerJim Jagielski <jim@apache.org>
Thu, 19 May 2011 15:58:15 +0000 (15:58 +0000)
to allow "best guess" calculation of PATH_INFO for backend
FCGI/SCGI servers

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1124979 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
docs/manual/mod/mod_proxy_scgi.xml
modules/proxy/mod_proxy_scgi.c

diff --git a/CHANGES b/CHANGES
index 0ee5b5781c3c4b30515801fdfa908bc8f2879e6d..13b38b65fbc452a0910f228ac8fc1073dcb2e8ea 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -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.
index 184df0f0cca1a35c8e7e4e4ac0e30316b81a0e69..1010f336a63c594a01d3e1ec7ee029a930c6dde5 100644 (file)
     </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
index 8925fa7c4d157d7a8d24f7bcfd020689ad649251..cdd33eb8d95b9e6988e21ba6f716f4f304fa7ff7 100644 (file)
@@ -204,7 +204,11 @@ static int scgi_canon(request_rec *r, char *url)
 
     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;
 }