diff options
author | thiagoftsm <thiagoftsm@gmail.com> | 2020-03-12 14:23:12 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-12 14:23:12 +0000 |
commit | 6faecab5150af3e14802199c2255924a83151fc4 (patch) | |
tree | a997f3d713c8ca2378da58660693b99df3277266 /libnetdata/url | |
parent | 11fa175c98855d1d142ac256df8e6bad6600498c (diff) |
Enconde slave fields (#8216)
* stream_encode: Enconde slave
This commit encodes the messages before to send them from master to slave
* stream_encode: Remove comma
This commit changes the comma to semi-colon to bring a pattern to code
Diffstat (limited to 'libnetdata/url')
-rw-r--r-- | libnetdata/url/url.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libnetdata/url/url.c b/libnetdata/url/url.c index d1d5081397..3de94fde7e 100644 --- a/libnetdata/url/url.c +++ b/libnetdata/url/url.c @@ -31,8 +31,11 @@ char *url_encode(char *str) { else if (*str == ' ') *pbuf++ = '+'; - else - *pbuf++ = '%', *pbuf++ = to_hex(*str >> 4), *pbuf++ = to_hex(*str & 15); + else{ + *pbuf++ = '%'; + *pbuf++ = to_hex(*str >> 4); + *pbuf++ = to_hex(*str & 15); + } str++; } |