aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2012-06-04 19:22:17 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2012-06-04 19:22:17 +0400
commitef215d6ef17e5ce23f4c7d4b625ff820c56c7de4 (patch)
tree20af7574474d78c69fb76d8435d4e139e9d65ae6 /src
parent68e60c48745e40038e9a123fe9381b86d0b1534e (diff)
downloadrspamd-ef215d6ef17e5ce23f4c7d4b625ff820c56c7de4.tar.gz
rspamd-ef215d6ef17e5ce23f4c7d4b625ff820c56c7de4.zip
Assume empty headers as headers with "" as value.
Diffstat (limited to 'src')
-rw-r--r--src/message.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/message.c b/src/message.c
index 7620eb25d..b51114fd0 100644
--- a/src/message.c
+++ b/src/message.c
@@ -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;