]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix empty headers simple canonicalization
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 3 Nov 2017 19:23:03 +0000 (19:23 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 3 Nov 2017 19:23:03 +0000 (19:23 +0000)
Issue: #1904
MFH: rspamd-1.6

src/libmime/mime_headers.c

index 742b36fd325fdcc10b0baa75a4c866d1d70cbe1d..95f8d9ba6961f655b70ee2783208b2ce50c5e590 100644 (file)
@@ -365,8 +365,9 @@ rspamd_mime_headers_process (struct rspamd_task *task, GHashTable *target,
                        /* Header has only name, no value */
                        nh->value = "";
                        nh->decoded = "";
-                       rspamd_mime_header_add (task, target, order, nh, check_newlines);
+                       nh->raw_len = p - nh->raw_value;
                        nh->order = norder ++;
+                       rspamd_mime_header_add (task, target, order, nh, check_newlines);
                        state = 0;
                        break;
                case 99: