diff options
author | Roman Arutyunyan <arut@nginx.com> | 2017-12-21 13:29:40 +0300 |
---|---|---|
committer | Roman Arutyunyan <arut@nginx.com> | 2017-12-21 13:29:40 +0300 |
commit | 0ad556fe59ad132dc4d34dea9e80f2ff2c3c1314 (patch) | |
tree | 03428d14da482461126e0c0be5cb6e892bb49fad /src/core/ngx_conf_file.c | |
parent | ce45ded2a8c1b0c0e601779bcc3e54668a14e271 (diff) | |
download | nginx-0ad556fe59ad132dc4d34dea9e80f2ff2c3c1314.tar.gz nginx-0ad556fe59ad132dc4d34dea9e80f2ff2c3c1314.zip |
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}.
Diffstat (limited to 'src/core/ngx_conf_file.c')
-rw-r--r-- | src/core/ngx_conf_file.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/ngx_conf_file.c b/src/core/ngx_conf_file.c index fb28a5a94..ba454dea8 100644 --- 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; } |