Skip to content

Commit cab0bfb

Browse files
committed
Strip proxy:fcgi:// just like proxy:balancer
Submitted By: Jacob Champion <champion.pxi gmail.com> Committed By: covener git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1747810 13f79535-47bb-0310-9956-ffa450edef68
1 parent 3973f9d commit cab0bfb

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

CHANGES

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
-*- coding: utf-8 -*-
22
Changes with Apache 2.5.0
33

4+
*) mod_proxy_fcgi: Avoid passing a filename of proxy:fcgi:// as
5+
SCRIPT_FILENAME to a FastCGI server. PR59618.
6+
[Jacob Champion <champion.pxi gmail.com>]
7+
48
*) core: Add -DDUMP_INCLUDES configtest option to show the tree
59
of Included configuration files. [Jacob Champion <champion.pxi gmail.com>]
610

modules/proxy/mod_proxy_fcgi.c

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -262,11 +262,21 @@ static apr_status_t send_environment(proxy_conn_rec *conn, request_rec *r,
262262
}
263263
}
264264

265-
/* Strip balancer prefix */
266-
if (r->filename && !strncmp(r->filename, "proxy:balancer://", 17)) {
267-
char *newfname = apr_pstrdup(r->pool, r->filename+17);
268-
newfname = ap_strchr(newfname, '/');
269-
r->filename = newfname;
265+
/* Strip proxy: prefixes */
266+
if (r->filename) {
267+
char *newfname = NULL;
268+
269+
if (!strncmp(r->filename, "proxy:balancer://", 17)) {
270+
newfname = apr_pstrdup(r->pool, r->filename+17);
271+
}
272+
else if (!strncmp(r->filename, "proxy:fcgi://", 13)) {
273+
newfname = apr_pstrdup(r->pool, r->filename+13);
274+
}
275+
276+
if (newfname) {
277+
newfname = ap_strchr(newfname, '/');
278+
r->filename = newfname;
279+
}
270280
}
271281

272282
ap_add_common_vars(r);

0 commit comments

Comments
 (0)