]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix append HTTP header routine
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 7 May 2017 12:25:31 +0000 (13:25 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 7 May 2017 13:05:12 +0000 (14:05 +0100)
src/libutil/http.c

index 8331b2406d13838ce0e763d2a805ae3d9c91c87a..ab3c386dc0f4b7e87ef65084f70f8aad1f7cd50a 100644 (file)
@@ -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;