allow duplicate listen ssl options
diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c
index f9aa44c..58fc7af 100644
--- a/src/http/ngx_http.c
+++ b/src/http/ngx_http.c
@@ -1221,6 +1221,9 @@
#if (NGX_HAVE_UNIX_DOMAIN)
struct sockaddr_un *saun;
#endif
+#if (NGX_HTTP_SSL)
+ ngx_uint_t ssl;
+#endif
/*
* we can not compare whole sockaddr struct's as kernel
@@ -1270,6 +1273,10 @@
/* preserve default_server bit during listen options overwriting */
default_server = addr[i].opt.default_server;
+#if (NGX_HTTP_SSL)
+ ssl = lsopt->ssl || addr[i].opt.set;
+#endif
+
if (lsopt->set) {
if (addr[i].opt.set) {
@@ -1296,6 +1303,9 @@
}
addr[i].opt.default_server = default_server;
+#if (NGX_HTTP_SSL)
+ addr[i].opt.ssl = ssl;
+#endif
return NGX_OK;
}
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index d29d208..73cde3d 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -3569,7 +3569,6 @@
if (ngx_strcmp(value[n].data, "ssl") == 0) {
#if (NGX_HTTP_SSL)
- lsopt.set = 1;
lsopt.ssl = 1;
continue;
#else