]> granicus.if.org Git - apache/commitdiff
Add error messages and return bad request.
authorJean-Frederic Clere <jfclere@apache.org>
Fri, 23 Nov 2018 09:32:20 +0000 (09:32 +0000)
committerJean-Frederic Clere <jfclere@apache.org>
Fri, 23 Nov 2018 09:32:20 +0000 (09:32 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1847232 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/mod_proxy_balancer.c

index ad8d3c3e244cd1c62805e497dfbd2fbf46949824..80e64944e8a8543ae7178b185a56501e741d2898 100644 (file)
@@ -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;
             }
 
         }