summaryrefslogtreecommitdiff
path: root/modules/proxy/mod_proxy.c
diff options
context:
space:
mode:
authorGraham Leggett <minfrin@apache.org>2018-02-13 21:22:05 +0000
committerGraham Leggett <minfrin@apache.org>2018-02-13 21:22:05 +0000
commitfac7f995b092f9b8b72d0c22f2de4c918bcf2e33 (patch)
tree1f943fe786d7d5d9b13a24633be39532c28490ea /modules/proxy/mod_proxy.c
parent965dae9007caa864f05f6ef14f9d9c066e27b3cc (diff)
downloadhttpd-fac7f995b092f9b8b72d0c22f2de4c918bcf2e33.tar.gz
mod_proxy: Provide an RFC1035 compliant version of the hostname in the
proxy_worker_shared structure. PR62085 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1824176 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/proxy/mod_proxy.c')
-rw-r--r--modules/proxy/mod_proxy.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c
index 2aa491e372..c585455205 100644
--- a/modules/proxy/mod_proxy.c
+++ b/modules/proxy/mod_proxy.c
@@ -2879,7 +2879,7 @@ static int proxy_status_hook(request_rec *r, int flags)
char fbuf[50];
if (!(flags & AP_STATUS_SHORT)) {
ap_rvputs(r, "<tr>\n<td>", (*worker)->s->scheme, "</td>", NULL);
- ap_rvputs(r, "<td>", (*worker)->s->hostname, "</td><td>", NULL);
+ ap_rvputs(r, "<td>", (*worker)->s->hostname_ex, "</td><td>", NULL);
ap_rvputs(r, ap_proxy_parse_wstatus(r->pool, *worker), NULL);
ap_rvputs(r, "</td><td>", (*worker)->s->route, NULL);
ap_rvputs(r, "</td><td>", (*worker)->s->redirect, NULL);
@@ -2971,7 +2971,8 @@ static void child_init(apr_pool_t *p, server_rec *s)
ap_proxy_define_worker(p, &forward, NULL, NULL, "http://www.apache.org", 0);
conf->forward = forward;
PROXY_STRNCPY(conf->forward->s->name, "proxy:forward");
- PROXY_STRNCPY(conf->forward->s->hostname, "*");
+ PROXY_STRNCPY(conf->forward->s->hostname, "*"); /* for compatibility */
+ PROXY_STRNCPY(conf->forward->s->hostname_ex, "*");
PROXY_STRNCPY(conf->forward->s->scheme, "*");
conf->forward->hash.def = conf->forward->s->hash.def =
ap_proxy_hashfunc(conf->forward->s->name, PROXY_HASHFUNC_DEFAULT);
@@ -2988,7 +2989,8 @@ static void child_init(apr_pool_t *p, server_rec *s)
if (!reverse) {
ap_proxy_define_worker(p, &reverse, NULL, NULL, "http://www.apache.org", 0);
PROXY_STRNCPY(reverse->s->name, "proxy:reverse");
- PROXY_STRNCPY(reverse->s->hostname, "*");
+ PROXY_STRNCPY(reverse->s->hostname, "*"); /* for compatibility */
+ PROXY_STRNCPY(reverse->s->hostname_ex, "*");
PROXY_STRNCPY(reverse->s->scheme, "*");
reverse->hash.def = reverse->s->hash.def =
ap_proxy_hashfunc(reverse->s->name, PROXY_HASHFUNC_DEFAULT);