Welcome! Log In Create A New Profile

Advanced

[nginx] Disabled duplicate http, mail, and stream blocks.

Vladimir Homutov
June 16, 2015 04:38PM
details: http://hg.nginx.org/nginx/rev/78c06e5e1d76
branches:
changeset: 6193:78c06e5e1d76
user: Vladimir Homutov <vl@nginx.com>
date: Tue Jun 16 23:28:38 2015 +0300
description:
Disabled duplicate http, mail, and stream blocks.

Such configurations have very limited use, introduce various problems and
are not officially supported.

diffstat:

src/http/ngx_http.c | 4 ++++
src/mail/ngx_mail.c | 4 ++++
src/stream/ngx_stream.c | 4 ++++
3 files changed, 12 insertions(+), 0 deletions(-)

diffs (42 lines):

diff -r 7863b167dbf9 -r 78c06e5e1d76 src/http/ngx_http.c
--- a/src/http/ngx_http.c Tue Jun 16 23:31:31 2015 +0300
+++ b/src/http/ngx_http.c Tue Jun 16 23:28:38 2015 +0300
@@ -128,6 +128,10 @@ ngx_http_block(ngx_conf_t *cf, ngx_comma
ngx_http_core_srv_conf_t **cscfp;
ngx_http_core_main_conf_t *cmcf;

+ if (*(ngx_http_conf_ctx_t **) conf) {
+ return "is duplicate";
+ }
+
/* the main http context */

ctx = ngx_pcalloc(cf->pool, sizeof(ngx_http_conf_ctx_t));
diff -r 7863b167dbf9 -r 78c06e5e1d76 src/mail/ngx_mail.c
--- a/src/mail/ngx_mail.c Tue Jun 16 23:31:31 2015 +0300
+++ b/src/mail/ngx_mail.c Tue Jun 16 23:28:38 2015 +0300
@@ -76,6 +76,10 @@ ngx_mail_block(ngx_conf_t *cf, ngx_comma
ngx_mail_core_srv_conf_t **cscfp;
ngx_mail_core_main_conf_t *cmcf;

+ if (*(ngx_mail_conf_ctx_t **) conf) {
+ return "is duplicate";
+ }
+
/* the main mail context */

ctx = ngx_pcalloc(cf->pool, sizeof(ngx_mail_conf_ctx_t));
diff -r 7863b167dbf9 -r 78c06e5e1d76 src/stream/ngx_stream.c
--- a/src/stream/ngx_stream.c Tue Jun 16 23:31:31 2015 +0300
+++ b/src/stream/ngx_stream.c Tue Jun 16 23:28:38 2015 +0300
@@ -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));

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Disabled duplicate http, mail, and stream blocks.

Vladimir Homutov 666 June 16, 2015 04:38PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 178
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready