comparison src/core/ngx_conf_file.c @ 5227:ea41bba49e8a

Core: strengthen configuration syntax checker. It is now a syntax error if tokens passed to a custom configuration handler are terminated by "{". The following incorrect configuration is now properly rejected: map $v $v2 { a b { c d { e f { }
author Valentin Bartenev <vbart@nginx.com>
date Thu, 23 May 2013 20:30:27 +0400
parents f941cf265cc5
children 12dd27b74117
comparison
equal deleted inserted replaced
5226:a30ea5c6451d 5227:ea41bba49e8a
223 /* 223 /*
224 * the custom handler, i.e., that is used in the http's 224 * the custom handler, i.e., that is used in the http's
225 * "types { ... }" directive 225 * "types { ... }" directive
226 */ 226 */
227 227
228 if (rc == NGX_CONF_BLOCK_START) {
229 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "unexpected \"{\"");
230 goto failed;
231 }
232
228 rv = (*cf->handler)(cf, NULL, cf->handler_conf); 233 rv = (*cf->handler)(cf, NULL, cf->handler_conf);
229 if (rv == NGX_CONF_OK) { 234 if (rv == NGX_CONF_OK) {
230 continue; 235 continue;
231 } 236 }
232 237