Skip to content

Commit 07279f7

Browse files
committed
mod_proxy_fgci: Follow up to r1919628: Simplify.
Variable from_handler is used once so axe it. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1921237 13f79535-47bb-0310-9956-ffa450edef68
1 parent d4f6ad9 commit 07279f7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

modules/proxy/mod_proxy_fcgi.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ static int proxy_fcgi_canon(request_rec *r, char *url)
6565
const char *pathinfo_type = NULL;
6666
fcgi_dirconf_t *dconf = ap_get_module_config(r->per_dir_config,
6767
&proxy_fcgi_module);
68-
int from_handler;
6968

7069
if (ap_cstr_casecmpn(url, "fcgi:", 5) == 0) {
7170
url += 5;
@@ -95,11 +94,10 @@ static int proxy_fcgi_canon(request_rec *r, char *url)
9594
host = apr_pstrcat(r->pool, "[", host, "]", NULL);
9695
}
9796

98-
from_handler = apr_table_get(r->notes, "proxy-sethandler") != NULL;
99-
if (from_handler
97+
if (apr_table_get(r->notes, "proxy-sethandler")
10098
|| apr_table_get(r->notes, "proxy-nocanon")
10199
|| apr_table_get(r->notes, "proxy-noencode")) {
102-
char *c = path = url; /* this is the raw path */
100+
char *c = url;
103101

104102
/* We do not call ap_proxy_canonenc_ex() on the path here, don't
105103
* let control characters pass still, and for php-fpm no '?' either.
@@ -114,10 +112,12 @@ static int proxy_fcgi_canon(request_rec *r, char *url)
114112
}
115113
if (*c) {
116114
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(10414)
117-
"To be forwarded path contains control characters%s",
118-
FCGI_MAY_BE_FPM(dconf) ? " or '?'" : "");
115+
"To be forwarded path contains control characters%s (%s)",
116+
FCGI_MAY_BE_FPM(dconf) ? " or '?'" : "", url);
119117
return HTTP_FORBIDDEN;
120118
}
119+
120+
path = url; /* this is the raw path */
121121
}
122122
else {
123123
core_dir_config *d = ap_get_core_module_config(r->per_dir_config);

0 commit comments

Comments
 (0)