Browse Source

[core] adjust parser for valid variable expansion

adjust config parser for valid variable expansion
Return only the value when a variable is expanded so that the
array element keeps its state as value-only or part of key-value

(thx nicorac)

x-ref:
  "https://redmine.lighttpd.net/boards/2/topics/7600"
personal/stbuehler/cleanup-build
Glenn Strauss 4 years ago
parent
commit
41eb4d323c
  1. 4
      src/configparser.y

4
src/configparser.y

@ -50,7 +50,9 @@ static data_unset *configparser_get_variable(config_t *ctx, const buffer *key) {
array_print(dc->value, 0);
#endif
if (NULL != (du = array_get_element_klen(dc->value, CONST_BUF_LEN(key)))) {
return du->copy(du);
du = du->copy(du);
buffer_reset(du->key);
return du;
}
}
return NULL;

Loading…
Cancel
Save