diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2023-08-22 10:53:59 +0000 |
---|---|---|
committer | Laurent Bercot <ska@appnovation.com> | 2023-08-22 10:53:59 +0000 |
commit | 8dd7b34dee5407324616dad6405d50aae4998b32 (patch) | |
tree | 173125ee1f1b63171d5507e56fcc5ece482f6c55 /src/config | |
parent | 97eae758b6ba3f4f951a54282a1fc57c721cf037 (diff) | |
download | tipidee-8dd7b34dee5407324616dad6405d50aae4998b32.tar.gz tipidee-8dd7b34dee5407324616dad6405d50aae4998b32.tar.xz tipidee-8dd7b34dee5407324616dad6405d50aae4998b32.zip |
Fix redirection with sub
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/config')
-rw-r--r-- | src/config/lexparse.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/config/lexparse.c b/src/config/lexparse.c index a051f93..a7ed5b2 100644 --- a/src/config/lexparse.c +++ b/src/config/lexparse.c @@ -185,7 +185,9 @@ static inline void parse_redirect (char const *s, size_t const *word, size_t n, confnode_start(&node, key, md->filepos, md->line) ; key[0] = '@' | i ; confnode_add(&node, &key[0], 1) ; - confnode_add(&node, s + word[2], strlen(s + word[2]) + 1) ; + urlen = strlen(s + word[2]) ; + confnode_add(&node, s + word[2], urlen - (s[word[2] + urlen - 1] == '/')) ; + confnode_add(&node, "", 1) ; conftree_add(&node) ; } } |