summaryrefslogtreecommitdiffhomepage
path: root/src/http/ngx_http_core_module.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/ngx_http_core_module.c')
-rw-r--r--src/http/ngx_http_core_module.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index cd7159e08..ad009462e 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -2819,6 +2819,7 @@ ngx_http_core_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child)
#if (NGX_PCRE)
sn->regex = NULL;
+ sn->captures = 0;
#endif
sn->core_srv_conf = conf;
sn->name.len = conf->server_name.len;
@@ -3420,6 +3421,7 @@ ngx_http_core_server_name(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
#if (NGX_PCRE)
sn->regex = NULL;
+ sn->captures = 0;
#endif
sn->core_srv_conf = cscf;
sn->name = value[i];
@@ -3446,6 +3448,7 @@ ngx_http_core_server_name(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
return NGX_CONF_ERROR;
}
+ sn->captures = (ngx_regex_capture_count(sn->regex) > 0);
sn->name = value[i];
}
#else