summaryrefslogtreecommitdiffstats
path: root/modules/proxy/proxy_util.c
diff options
context:
space:
mode:
authorJim Jagielski <jim@apache.org>2011-11-28 18:10:17 +0100
committerJim Jagielski <jim@apache.org>2011-11-28 18:10:17 +0100
commitc4ec235bb0fd5963672b33ca9f6d5c8734302898 (patch)
tree2bc09c2fe7dfeeeff0629d13d944ee39dd8a2eca /modules/proxy/proxy_util.c
parentError-check. (diff)
downloadapache2-c4ec235bb0fd5963672b33ca9f6d5c8734302898.tar.xz
apache2-c4ec235bb0fd5963672b33ca9f6d5c8734302898.zip
"Final" (I hope) proxy struct/API changes in order to support
dynamic balancer allocation AND dynamic vhost-balancers git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1207467 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--modules/proxy/proxy_util.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c
index 86ce41b08f..a89a8db233 100644
--- a/modules/proxy/proxy_util.c
+++ b/modules/proxy/proxy_util.c
@@ -1329,6 +1329,7 @@ PROXY_DECLARE(char *) ap_proxy_define_balancer(apr_pool_t *p,
proxy_balancer_shared *bshared;
char *c, *q, *uri = apr_pstrdup(p, url);
const char *sname;
+ apr_uri_t puri;
/* We should never get here without a valid BALANCER_PREFIX... */
@@ -1343,6 +1344,8 @@ PROXY_DECLARE(char *) ap_proxy_define_balancer(apr_pool_t *p,
*balancer = apr_array_push(conf->balancers);
memset(*balancer, 0, sizeof(proxy_balancer));
+ apr_uri_parse(p, alias, &puri);
+
/*
* NOTE: The default method is byrequests, which we assume
* exists!
@@ -1375,8 +1378,8 @@ PROXY_DECLARE(char *) ap_proxy_define_balancer(apr_pool_t *p,
if (PROXY_STRNCPY(bshared->sname, sname) != APR_SUCCESS) {
return apr_psprintf(p, "balancer safe-name (%s) too long", sname);
}
- if (PROXY_STRNCPY(bshared->alias, alias) != APR_SUCCESS) {
- return apr_psprintf(p, "balancer front-end url (%s) too long", alias);
+ if (PROXY_STRNCPY(bshared->vpath, puri.path) != APR_SUCCESS) {
+ return apr_psprintf(p, "balancer front-end virtual-path (%s) too long", puri.path);
}
bshared->hash = ap_proxy_hashfunc(bshared->name, PROXY_HASHFUNC_DEFAULT);
(*balancer)->hash = bshared->hash;