Skip to content

Commit

Permalink
mod_proxy_fgci: Follow up to r1919628: Simplify.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ylavic committed Oct 10, 2024
1 parent fd9c416 commit b0d469a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions modules/proxy/mod_proxy_fcgi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.
Expand All @@ -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);
Expand Down

0 comments on commit b0d469a

Please sign in to comment.