]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Assume empty headers as headers with "" as value.
authorVsevolod Stakhov <vsevolod@rambler-co.ru>
Mon, 4 Jun 2012 15:22:17 +0000 (19:22 +0400)
committerVsevolod Stakhov <vsevolod@rambler-co.ru>
Mon, 4 Jun 2012 15:22:17 +0000 (19:22 +0400)
src/message.c

index 7620eb25dff0e4386ffcb54574e47a7153e5a258..b51114fd0f5cda19bb402b1a44ed336f0d63ba54 100644 (file)
@@ -541,7 +541,7 @@ process_raw_headers (struct worker_task *task)
                        else {
                                /* Process value */
                                l = p - c;
-                               if (l > 0) {
+                               if (l >= 0) {
                                        tmp = memory_pool_alloc (task->task_pool, l + 1);
                                        rspamd_strlcpy (tmp, c, l + 1);
                                        new->separator = tmp;
@@ -615,6 +615,7 @@ process_raw_headers (struct worker_task *task)
                case 5:
                        /* Header has only name, no value */
                        new->next = NULL;
+                       new->value = "";
                        if ((lp = g_hash_table_lookup (task->raw_headers, new->name)) != NULL) {
                                while (lp->next != NULL) {
                                        lp = lp->next;