Commit c0be0163 authored by Jim Jagielski's avatar Jim Jagielski
Browse files

Sync up with trunk


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/httpd-2.2-proxy@774427 13f79535-47bb-0310-9956-ffa450edef68
parent bc15e341
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -95,11 +95,21 @@ static proxy_worker *find_best_roundrobin(proxy_balancer *balancer,
    return mycandidate;
}

static apr_status_t reset(proxy_balancer *balancer, server_rec *s) {
        return APR_SUCCESS;
}

static apr_status_t age(proxy_balancer *balancer, server_rec *s) {
        return APR_SUCCESS;
}

static const proxy_balancer_method roundrobin =
{
    "roundrobin",
    &find_best_roundrobin,
    NULL
    NULL,
    &reset,
    &age
};


+4 −4
Original line number Diff line number Diff line
@@ -103,11 +103,11 @@ static proxy_worker *find_best_bybusyness(proxy_balancer *balancer,

}

static apr_status_t reset(proxy_balancer *balancer, request_rec *r) {
static apr_status_t reset(proxy_balancer *balancer, server_rec *s) {
        return APR_SUCCESS;
}

static apr_status_t age(proxy_balancer *balancer, request_rec *r) {
static apr_status_t age(proxy_balancer *balancer, server_rec *s) {
        return APR_SUCCESS;
}

@@ -115,7 +115,7 @@ const proxy_balancer_method proxy_balancer_bybusyness =
{
    "bybusyness",
    &find_best_bybusyness,
    NULL,
    &reset,
    &age,
    NULL
    &age
};
+4 −4
Original line number Diff line number Diff line
@@ -130,11 +130,11 @@ static proxy_worker *find_best_byrequests(proxy_balancer *balancer,
    return mycandidate;
}

static apr_status_t reset(proxy_balancer *balancer, request_rec *r) {
static apr_status_t reset(proxy_balancer *balancer, server_rec *s) {
        return APR_SUCCESS;
}

static apr_status_t age(proxy_balancer *balancer, request_rec *r) {
static apr_status_t age(proxy_balancer *balancer, server_rec *s) {
        return APR_SUCCESS;
}

@@ -148,7 +148,7 @@ const proxy_balancer_method proxy_balancer_byrequests =
{
    "byrequests",
    &find_best_byrequests,
    NULL,
    &reset,
    &age,
    NULL
    &age
};
+4 −4
Original line number Diff line number Diff line
@@ -103,11 +103,11 @@ static proxy_worker *find_best_bytraffic(proxy_balancer *balancer,
    return mycandidate;
}

static apr_status_t reset(proxy_balancer *balancer, request_rec *r) {
static apr_status_t reset(proxy_balancer *balancer, server_rec *s) {
        return APR_SUCCESS;
}

static apr_status_t age(proxy_balancer *balancer, request_rec *r) {
static apr_status_t age(proxy_balancer *balancer, server_rec *s) {
        return APR_SUCCESS;
}

@@ -115,7 +115,7 @@ const proxy_balancer_method proxy_balancer_bytraffic =
{
    "bytraffic",
    &find_best_bytraffic,
    NULL,
    &reset,
    &age,
    NULL
    &age
};
+10 −3
Original line number Diff line number Diff line
@@ -933,6 +933,13 @@ static int proxy_handler(request_rec *r)
                balancer = NULL;
            goto cleanup;
        }

        /* Initialise worker if needed, note the shared area must be initialized by the balancer logic */
        if (balancer) {
            ap_proxy_initialize_worker(worker, r->server, conf->pool); 
            ap_proxy_initialize_worker_share(conf, worker, r->server);
        }

        if (balancer && balancer->max_attempts_set && !max_attempts)
            max_attempts = balancer->max_attempts;
        /* firstly, try a proxy, unless a NoProxy directive is active */
@@ -2286,7 +2293,7 @@ static void child_init(apr_pool_t *p, server_rec *s)
        worker = (proxy_worker *)conf->workers->elts;
        for (i = 0; i < conf->workers->nelts; i++) {
            ap_proxy_initialize_worker_share(conf, worker, s);
            ap_proxy_initialize_worker(worker, s);
            ap_proxy_initialize_worker(worker, s, p);
            worker++;
        }
        /* Create and initialize forward worker if defined */
@@ -2296,7 +2303,7 @@ static void child_init(apr_pool_t *p, server_rec *s)
            conf->forward->hostname = "*";
            conf->forward->scheme   = "*";
            ap_proxy_initialize_worker_share(conf, conf->forward, s);
            ap_proxy_initialize_worker(conf->forward, s);
            ap_proxy_initialize_worker(conf->forward, s, p);
            /* Do not disable worker in case of errors */
            conf->forward->s->status |= PROXY_WORKER_IGNORE_ERRORS;
            /* Disable address cache for generic forward worker */
@@ -2308,7 +2315,7 @@ static void child_init(apr_pool_t *p, server_rec *s)
            reverse->hostname = "*";
            reverse->scheme   = "*";
            ap_proxy_initialize_worker_share(conf, reverse, s);
            ap_proxy_initialize_worker(reverse, s);
            ap_proxy_initialize_worker(reverse, s, p);
            /* Do not disable worker in case of errors */
            reverse->s->status |= PROXY_WORKER_IGNORE_ERRORS;
            /* Disable address cache for generic reverse worker */
Loading