From 3da4ecd8155c030c8ca68ef529079e765c31769e Mon Sep 17 00:00:00 2001 From: Jim Jagielski Date: Thu, 19 May 2011 15:58:15 +0000 Subject: [PATCH 1/1] Add in proxy-scgi-pathinfo and proxy-fcgi-pathinfo envvars 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 | 4 ++++ docs/manual/mod/mod_proxy_scgi.xml | 16 ++++++++++++++++ modules/proxy/mod_proxy_scgi.c | 6 +++++- 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 0ee5b5781c..13b38b65fb 100644 --- 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 , + 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. diff --git a/docs/manual/mod/mod_proxy_scgi.xml b/docs/manual/mod/mod_proxy_scgi.xml index 184df0f0cc..1010f336a6 100644 --- a/docs/manual/mod/mod_proxy_scgi.xml +++ b/docs/manual/mod/mod_proxy_scgi.xml @@ -75,6 +75,22 @@ +
Environment Variables +

In addition to the configuration directives that control the + behaviour of mod_proxy, there are a number of + environment variables that control the SCGI protocol + provider:

+
+
proxy-scgi-pathinfo
+
By default mod_proxy_scgi will neither create + nor export the PATH_INFO environment variable. This allows + the backend SCGI server to correctly determine SCRIPT_NAME + and Script-URI and be compliant with RFC 3875 section 3.3. + If instead you need mod_proxy_scgi to generate + a "best guess" for PATH_INFO, set this env-var.
+
+
+ ProxySCGISendfile Enable evaluation of X-Sendfile pseudo response diff --git a/modules/proxy/mod_proxy_scgi.c b/modules/proxy/mod_proxy_scgi.c index 8925fa7c4d..cdd33eb8d9 100644 --- a/modules/proxy/mod_proxy_scgi.c +++ b/modules/proxy/mod_proxy_scgi.c @@ -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; } -- 2.40.0