diff src/stream/ngx_stream.c @ 6193:78c06e5e1d76

Disabled duplicate http, mail, and stream blocks. Such configurations have very limited use, introduce various problems and are not officially supported.
author Vladimir Homutov <vl@nginx.com>
date Tue, 16 Jun 2015 23:28:38 +0300
parents 68c106e6fa0a
children 0f203a2af17c
line wrap: on
line diff
--- a/src/stream/ngx_stream.c
+++ b/src/stream/ngx_stream.c
@@ -76,6 +76,10 @@ ngx_stream_block(ngx_conf_t *cf, ngx_com
     ngx_stream_core_srv_conf_t   **cscfp;
     ngx_stream_core_main_conf_t   *cmcf;
 
+    if (*(ngx_stream_conf_ctx_t **) conf) {
+        return "is duplicate";
+    }
+
     /* the main stream context */
 
     ctx = ngx_pcalloc(cf->pool, sizeof(ngx_stream_conf_ctx_t));