|
|
9364d6 |
diff --git a/modules/proxy/mod_proxy_hcheck.c b/modules/proxy/mod_proxy_hcheck.c
|
|
|
9364d6 |
index 0265b4a..d4ad526 100644
|
|
|
9364d6 |
--- a/modules/proxy/mod_proxy_hcheck.c
|
|
|
9364d6 |
+++ b/modules/proxy/mod_proxy_hcheck.c
|
|
|
9364d6 |
@@ -109,6 +109,10 @@ static const char *set_worker_hc_param(apr_pool_t *p,
|
|
|
9364d6 |
if (!worker && !v) {
|
|
|
9364d6 |
return "Bad call to set_worker_hc_param()";
|
|
|
9364d6 |
}
|
|
|
9364d6 |
+ if (!ctx) {
|
|
|
9364d6 |
+ ctx = hc_create_config(p, s);
|
|
|
9364d6 |
+ ap_set_module_config(s->module_config, &proxy_hcheck_module, ctx);
|
|
|
9364d6 |
+ }
|
|
|
9364d6 |
temp = (hc_template_t *)v;
|
|
|
9364d6 |
if (!strcasecmp(key, "hctemplate")) {
|
|
|
9364d6 |
hc_template_t *template;
|
|
|
9364d6 |
@@ -1049,6 +1053,8 @@ static void hc_show_exprs(request_rec *r)
|
|
|
9364d6 |
int i;
|
|
|
9364d6 |
sctx_t *ctx = (sctx_t *) ap_get_module_config(r->server->module_config,
|
|
|
9364d6 |
&proxy_hcheck_module);
|
|
|
9364d6 |
+ if (!ctx)
|
|
|
9364d6 |
+ return;
|
|
|
9364d6 |
if (apr_is_empty_table(ctx->conditions))
|
|
|
9364d6 |
return;
|
|
|
9364d6 |
|
|
|
9364d6 |
@@ -1078,6 +1084,8 @@ static void hc_select_exprs(request_rec *r, const char *expr)
|
|
|
9364d6 |
int i;
|
|
|
9364d6 |
sctx_t *ctx = (sctx_t *) ap_get_module_config(r->server->module_config,
|
|
|
9364d6 |
&proxy_hcheck_module);
|
|
|
9364d6 |
+ if (!ctx)
|
|
|
9364d6 |
+ return;
|
|
|
9364d6 |
if (apr_is_empty_table(ctx->conditions))
|
|
|
9364d6 |
return;
|
|
|
9364d6 |
|
|
|
9364d6 |
@@ -1101,6 +1109,8 @@ static int hc_valid_expr(request_rec *r, const char *expr)
|
|
|
9364d6 |
int i;
|
|
|
9364d6 |
sctx_t *ctx = (sctx_t *) ap_get_module_config(r->server->module_config,
|
|
|
9364d6 |
&proxy_hcheck_module);
|
|
|
9364d6 |
+ if (!ctx)
|
|
|
9364d6 |
+ return 0;
|
|
|
9364d6 |
if (apr_is_empty_table(ctx->conditions))
|
|
|
9364d6 |
return 0;
|
|
|
9364d6 |
|