]> git.kaiwu.me - nginx.git/commitdiff
Allowed configuration token to start with a variable.
authorRoman Arutyunyan <arut@nginx.com>
Thu, 21 Dec 2017 10:29:40 +0000 (13:29 +0300)
committerRoman Arutyunyan <arut@nginx.com>
Thu, 21 Dec 2017 10:29:40 +0000 (13:29 +0300)
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}.

src/core/ngx_conf_file.c

index fb28a5a946f32231fe2c0b2f2fc151b9c1da7e4e..ba454dea82ac1d1df7faa91dc49eea81cd05520f 100644 (file)
@@ -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;
             }