httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jfcl...@apache.org
Subject svn commit: r1847232 - /httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c
Date Fri, 23 Nov 2018 09:32:20 GMT
Author: jfclere
Date: Fri Nov 23 09:32:20 2018
New Revision: 1847232

URL: http://svn.apache.org/viewvc?rev=1847232&view=rev
Log:
Add error messages and return bad request.

Modified:
    httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c?rev=1847232&r1=1847231&r2=1847232&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c Fri Nov 23 09:32:20 2018
@@ -1411,12 +1411,23 @@ static int balancer_handler(request_rec
                     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;
             }
 
         }



Mime
View raw message