From: Yann Ylavic Date: Thu, 10 Oct 2024 15:36:48 +0000 (+0000) Subject: mod_proxy_fgci: Follow up to r1919628: Simplify. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b0d469a6d7aa97a560535089193b85d11ca11485;p=thirdparty%2Fapache%2Fhttpd.git 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 --- diff --git a/modules/proxy/mod_proxy_fcgi.c b/modules/proxy/mod_proxy_fcgi.c index 94aeae7ac4d..df8242a1212 100644 --- a/modules/proxy/mod_proxy_fcgi.c +++ b/modules/proxy/mod_proxy_fcgi.c @@ -65,7 +65,6 @@ static int proxy_fcgi_canon(request_rec *r, char *url) const char *pathinfo_type = NULL; fcgi_dirconf_t *dconf = ap_get_module_config(r->per_dir_config, &proxy_fcgi_module); - int from_handler; if (ap_cstr_casecmpn(url, "fcgi:", 5) == 0) { url += 5; @@ -95,11 +94,10 @@ static int proxy_fcgi_canon(request_rec *r, char *url) host = apr_pstrcat(r->pool, "[", host, "]", NULL); } - from_handler = apr_table_get(r->notes, "proxy-sethandler") != NULL; - if (from_handler + if (apr_table_get(r->notes, "proxy-sethandler") || apr_table_get(r->notes, "proxy-nocanon") || apr_table_get(r->notes, "proxy-noencode")) { - char *c = path = url; /* this is the raw path */ + char *c = url; /* We do not call ap_proxy_canonenc_ex() on the path here, don't * 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) } if (*c) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(10414) - "To be forwarded path contains control characters%s", - FCGI_MAY_BE_FPM(dconf) ? " or '?'" : ""); + "To be forwarded path contains control characters%s (%s)", + FCGI_MAY_BE_FPM(dconf) ? " or '?'" : "", url); return HTTP_FORBIDDEN; } + + path = url; /* this is the raw path */ } else { core_dir_config *d = ap_get_core_module_config(r->per_dir_config);