diff --git a/CHANGES b/CHANGES index 833fda02c6..4a837250e6 100644 --- a/CHANGES +++ b/CHANGES @@ -28,9 +28,8 @@ Changes with Apache 2.3.7 processing is completed, avoiding orphaned callback pointers. [Brett Gervasoni , Jeff Trawick] - *) Proxy balancer: support setting error status according to - HTTP response code from a backend. - PR 48939 [Daniel Ruggeri ] + *) Proxy balancer: support setting error status according to HTTP response + code from a backend. PR 48939. [Daniel Ruggeri ] *) htcacheclean: Introduce the ability to clean specific URLs from the cache, if provided as an optional parameter on the command line. diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c index 92975c4c99..18dfc53d10 100644 --- a/modules/proxy/mod_proxy.c +++ b/modules/proxy/mod_proxy.c @@ -393,7 +393,7 @@ static const char *set_balancer_param(proxy_server_conf *conf, while (status != NULL) { ival = atoi(status); if (ap_is_HTTP_VALID_RESPONSE(ival)) { - *(int*)apr_array_push(balancer->errstatuses) = ival; + *(int *)apr_array_push(balancer->errstatuses) = ival; } else { return "erroronstatus must be one or more HTTP response code"; diff --git a/modules/proxy/mod_proxy_balancer.c b/modules/proxy/mod_proxy_balancer.c index 1258f003a1..ff25ed0fa5 100644 --- a/modules/proxy/mod_proxy_balancer.c +++ b/modules/proxy/mod_proxy_balancer.c @@ -609,10 +609,10 @@ static int proxy_balancer_post_request(proxy_worker *worker, return HTTP_INTERNAL_SERVER_ERROR; } - if (!apr_is_empty_array(balancer->errstatuses)){ + if (!apr_is_empty_array(balancer->errstatuses)) { int i; for (i = 0; i < balancer->errstatuses->nelts; i++) { - int val=((int*)balancer->errstatuses->elts)[i]; + int val = ((int *)balancer->errstatuses->elts)[i]; if (r->status == val) { ap_log_error(APLOG_MARK, APLOG_NOTICE, rv, r->server, "Detected ErrorOnState (%d) for member (%s). Forcing worker into error state.", val, worker->name);