summaryrefslogtreecommitdiffstats
path: root/libnetdata/url
diff options
context:
space:
mode:
authorthiagoftsm <thiagoftsm@gmail.com>2020-03-12 14:23:12 +0000
committerGitHub <noreply@github.com>2020-03-12 14:23:12 +0000
commit6faecab5150af3e14802199c2255924a83151fc4 (patch)
treea997f3d713c8ca2378da58660693b99df3277266 /libnetdata/url
parent11fa175c98855d1d142ac256df8e6bad6600498c (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.c7
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++;
}