Commit 29a0e070 authored by Jim Jagielski's avatar Jim Jagielski
Browse files

Fix/workaround for BUGZ PR 50851.

By default, mod_proxy_fcgi with not create PATH_INFO, unless
specifically told to.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1078089 13f79535-47bb-0310-9956-ffa450edef68
parent 2ac85d15
Loading
Loading
Loading
Loading
+17 −0
Changes for docs/manual/mod/mod_proxy_fcgi.xml: 17 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -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>
+2 −0
Changes for modules/proxy/mod_proxy_fcgi.c: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -119,10 +119,12 @@ static int proxy_fcgi_canon(request_rec *r, char *url)
    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
                  "proxy: FCGI: set r->filename to %s", r->filename);

    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);
    }

    return OK;
}