changeset 7177:d91a8c4ac6bb

Allowed configuration token to start with a variable. Specifically, it is now allowed to start with a variable expression with braces: ${name}. The opening curly bracket in such a token was previously considered the start of a new block. Variables located anywhere else in a token worked fine: foo${name}.
author Roman Arutyunyan <arut@nginx.com>
date Thu, 21 Dec 2017 13:29:40 +0300
parents 7f28b61c92f0
children e2685c467496
files src/core/ngx_conf_file.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/core/ngx_conf_file.c
+++ b/src/core/ngx_conf_file.c
@@ -709,6 +709,11 @@ ngx_conf_read_token(ngx_conf_t *cf)
                 last_space = 0;
                 continue;
 
+            case '$':
+                variable = 1;
+                last_space = 0;
+                continue;
+
             default:
                 last_space = 0;
             }