]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merging r1853560 from trunk:
authorStefan Eissing <icing@apache.org>
Tue, 30 Jul 2019 13:01:21 +0000 (13:01 +0000)
committerStefan Eissing <icing@apache.org>
Tue, 30 Jul 2019 13:01:21 +0000 (13:01 +0000)
  *) mod_proxy_hcheck: Create the configure for mod_proxy_hcheck when used in BalancerMember.
     PR 60757

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1864000 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/mod_proxy_hcheck.c

index dd3cb190481f562fc116aa1c9de85059bdf8405c..1307d5ae2b5a37286ba64ddb90328996592450f0 100644 (file)
@@ -110,6 +110,10 @@ static const char *set_worker_hc_param(apr_pool_t *p,
     if (!worker && !v) {
         return "Bad call to set_worker_hc_param()";
     }
+    if (!ctx) {
+        ctx = hc_create_config(p, s);
+        ap_set_module_config(s->module_config, &proxy_hcheck_module, ctx);
+    }
     temp = (hc_template_t *)v;
     if (!strcasecmp(key, "hctemplate")) {
         hc_template_t *template;
@@ -1059,6 +1063,8 @@ static void hc_show_exprs(request_rec *r)
     int i;
     sctx_t *ctx = (sctx_t *) ap_get_module_config(r->server->module_config,
                                                   &proxy_hcheck_module);
+    if (!ctx)
+        return;
     if (apr_is_empty_table(ctx->conditions))
         return;
 
@@ -1088,6 +1094,8 @@ static void hc_select_exprs(request_rec *r, const char *expr)
     int i;
     sctx_t *ctx = (sctx_t *) ap_get_module_config(r->server->module_config,
                                                   &proxy_hcheck_module);
+    if (!ctx)
+        return;
     if (apr_is_empty_table(ctx->conditions))
         return;
 
@@ -1111,6 +1119,8 @@ static int hc_valid_expr(request_rec *r, const char *expr)
     int i;
     sctx_t *ctx = (sctx_t *) ap_get_module_config(r->server->module_config,
                                                   &proxy_hcheck_module);
+    if (!ctx)
+        return 0;
     if (apr_is_empty_table(ctx->conditions))
         return 0;