Commit 1aa0d486 authored by Jean-Frederic Clere's avatar Jean-Frederic Clere
Browse files

Add error messages and return bad request.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1847232 13f79535-47bb-0310-9956-ffa450edef68
parent 6ec1b34d
Loading
Loading
Loading
Loading
+11 −0
Changes for modules/proxy/mod_proxy_balancer.c: 11 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -1411,12 +1411,23 @@ static int balancer_handler(request_rec *r)
                    bsel->wupdated = bsel->s->wupdated = nworker->s->updated = apr_time_now();
                    /* by default, all new workers are disabled */
                    ap_proxy_set_wstatus(PROXY_WORKER_DISABLED_FLAG, 1, nworker);
                } else {
                            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01207)
                                  "%s: failed to add worker %s",
                                  bsel->s->name, val);
                    PROXY_GLOBAL_UNLOCK(bsel);
                    return HTTP_BAD_REQUEST;
                }
                if ((rv = PROXY_GLOBAL_UNLOCK(bsel)) != APR_SUCCESS) {
                    ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01203)
                                  "%s: Unlock failed for adding worker",
                                  bsel->s->name);
                }
            } else {
                ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01207)
                                  "%s: failed to add worker %s",
                                  bsel->s->name, val);
                return HTTP_BAD_REQUEST;
            }

        }