From c4ec235bb0fd5963672b33ca9f6d5c8734302898 Mon Sep 17 00:00:00 2001 From: Jim Jagielski Date: Mon, 28 Nov 2011 17:10:17 +0000 Subject: "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 --- modules/proxy/proxy_util.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'modules/proxy/proxy_util.c') 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; -- cgit v1.2.3