summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_conf_validation.c
diff options
context:
space:
mode:
authorZhidao HONG <z.hong@f5.com>2022-10-14 14:00:02 +0800
committerZhidao HONG <z.hong@f5.com>2022-10-14 14:00:02 +0800
commitc03ebf7ffec285c040450a1882687d762c7b1b4f (patch)
tree0cf6c3c520e07288896127b73b3907bd4bd38d19 /src/nxt_conf_validation.c
parentdb86dc0586ac6c7184eeacc3e8769816f90dfddd (diff)
downloadunit-c03ebf7ffec285c040450a1882687d762c7b1b4f.tar.gz
unit-c03ebf7ffec285c040450a1882687d762c7b1b4f.tar.bz2
Configuration: stopped automatic migration to the "share" behavior.
This commit removed the $uri auto-append for the "share" option introduced in rev be6409cdb028. The main reason is that it causes problems when preparing Unit configurations to be loaded at startup from the state directory. E.g. Docker. A valid conf.json file with $uri references will end up with $uri$uri due to the auto-append.
Diffstat (limited to 'src/nxt_conf_validation.c')
-rw-r--r--src/nxt_conf_validation.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/nxt_conf_validation.c b/src/nxt_conf_validation.c
index fe6c22e5..f8242f6e 100644
--- a/src/nxt_conf_validation.c
+++ b/src/nxt_conf_validation.c
@@ -1690,11 +1690,6 @@ static nxt_int_t
nxt_conf_vldt_share(nxt_conf_validation_t *vldt, nxt_conf_value_t *value,
void *data)
{
- u_char *p;
- nxt_str_t name, temp;
-
- static nxt_str_t uri = nxt_string("$uri");
-
if (nxt_conf_type(value) == NXT_CONF_ARRAY) {
if (nxt_conf_array_elements_count(value) == 0) {
return nxt_conf_vldt_error(vldt, "The \"share\" array "
@@ -1707,22 +1702,6 @@ nxt_conf_vldt_share(nxt_conf_validation_t *vldt, nxt_conf_value_t *value,
/* NXT_CONF_STRING */
- if (vldt->ver < 12600) {
- nxt_conf_get_string(value, &name);
-
- temp.length = name.length + uri.length;
-
- temp.start = nxt_mp_get(vldt->conf_pool, temp.length);
- if (nxt_slow_path(temp.start == NULL)) {
- return NXT_ERROR;
- }
-
- p = nxt_cpymem(temp.start, name.start, name.length);
- nxt_memcpy(p, uri.start, uri.length);
-
- nxt_conf_set_string(value, &temp);
- }
-
return nxt_conf_vldt_share_element(vldt, value);
}