aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-05-07 13:25:31 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-05-07 14:05:12 +0100
commitd9d0fa5e86db2f4470d34395a233b450478b2f60 (patch)
tree3d22de02dcd11d03cf80347673cecbe386edb233 /src
parent3aae8ca1deef000530953c4b57a565892e11fef3 (diff)
downloadrspamd-d9d0fa5e86db2f4470d34395a233b450478b2f60.tar.gz
rspamd-d9d0fa5e86db2f4470d34395a233b450478b2f60.zip
[Minor] Fix append HTTP header routine
Diffstat (limited to 'src')
-rw-r--r--src/libutil/http.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libutil/http.c b/src/libutil/http.c
index 8331b2406..ab3c386dc 100644
--- a/src/libutil/http.c
+++ b/src/libutil/http.c
@@ -2802,7 +2802,8 @@ rspamd_http_message_add_header_len (struct rspamd_http_message *msg,
nlen = strlen (name);
vlen = len;
hdr->combined = rspamd_fstring_sized_new (nlen + vlen + 4);
- rspamd_printf_fstring (&hdr->combined, "%s: %s\r\n", name, value);
+ rspamd_printf_fstring (&hdr->combined, "%s: %*s\r\n", name, (gint)nlen,
+ value);
hdr->value = g_slice_alloc (sizeof (*hdr->value));
hdr->name = g_slice_alloc (sizeof (*hdr->name));
hdr->name->begin = hdr->combined->str;