OCaml 4.14.0 rebuild
[arch-packages.git] / apache / repos / extra-x86_64 / script_name.patch
blob427659bd9eab1412341116fb379f1a99acd2647a
1 From 7806711b85b46c3caad150c8fde97f29f32ae6f8 Mon Sep 17 00:00:00 2001
2 From: Jim Jagielski <jim@apache.org>
3 Date: Mon, 3 Jul 2017 10:22:07 +0000
4 Subject: [PATCH] Merge r1800306, r1800393 from trunk:
6 proxy_fcgi: remove FPM-specific logic
8 Reverts r1780328, r1780329, and their associated followups, which
9 incorrectly manipulated SCRIPT_NAME by default. All proxy_fcgi.t
10 regression tests now pass.
12 PR: 61202
14 Partial reversal of r1800306... note virtual scripts in notes
16 Submitted by: jchampion, jim
17 Reviewed by: jchampion, jim, covener
20 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1800618 13f79535-47bb-0310-9956-ffa450edef68
21 ---
22 modules/proxy/mod_proxy_fcgi.c | 32 --------------------------------
23 3 files changed, 4 insertions(+), 39 deletions(-)
25 diff --git a/modules/proxy/mod_proxy_fcgi.c b/modules/proxy/mod_proxy_fcgi.c
26 index a268556e302..41292e87267 100644
27 --- a/modules/proxy/mod_proxy_fcgi.c
28 +++ b/modules/proxy/mod_proxy_fcgi.c
29 @@ -321,7 +321,6 @@ static apr_status_t send_environment(proxy_conn_rec *conn, request_rec *r,
30 apr_status_t rv;
31 apr_size_t avail_len, len, required_len;
32 int next_elem, starting_elem;
33 - int fpm = 0;
34 fcgi_req_config_t *rconf = ap_get_module_config(r->request_config, &proxy_fcgi_module);
35 fcgi_dirconf_t *dconf = ap_get_module_config(r->per_dir_config, &proxy_fcgi_module);
37 @@ -354,8 +353,6 @@ static apr_status_t send_environment(proxy_conn_rec *conn, request_rec *r,
38 *qs = '\0';
41 - } else {
42 - fpm = 1;
45 if (newfname) {
46 @@ -364,38 +361,9 @@ static apr_status_t send_environment(proxy_conn_rec *conn, request_rec *r,
50 -#if 0
51 - ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(09999)
52 - "r->filename: %s", (r->filename ? r->filename : "nil"));
53 - ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(09999)
54 - "r->uri: %s", (r->uri ? r->uri : "nil"));
55 - ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(09999)
56 - "r->path_info: %s", (r->path_info ? r->path_info : "nil"));
57 -#endif
59 ap_add_common_vars(r);
60 ap_add_cgi_vars(r);
62 - if (fpm || apr_table_get(r->notes, "virtual_script")) {
63 - /*
64 - * Adjust SCRIPT_NAME, PATH_INFO and PATH_TRANSLATED for PHP-FPM
65 - * TODO: Right now, PATH_INFO and PATH_TRANSLATED look OK...
66 - */
67 - const char *pend;
68 - const char *script_name = apr_table_get(r->subprocess_env, "SCRIPT_NAME");
69 - pend = script_name + strlen(script_name);
70 - if (r->path_info && *r->path_info) {
71 - pend = script_name + ap_find_path_info(script_name, r->path_info) - 1;
72 - }
73 - while (pend != script_name && *pend != '/') {
74 - pend--;
75 - }
76 - apr_table_setn(r->subprocess_env, "SCRIPT_NAME", pend);
77 - ap_log_rerror(APLOG_MARK, APLOG_TRACE4, 0, r,
78 - "fpm:virtual_script: Modified SCRIPT_NAME to: %s",
79 - pend);
80 - }
82 /* XXX are there any FastCGI specific env vars we need to send? */
84 /* Give admins final option to fine-tune env vars */