From 36565b887b51a6098863ae0513c438566c330f67 Mon Sep 17 00:00:00 2001 From: SJ Date: Sun, 9 Feb 2014 22:00:52 +0100 Subject: [PATCH] fixed a bug for detecting the header size for messages without body --- src/digest.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/digest.c b/src/digest.c index f28a685f..8a490829 100644 --- a/src/digest.c +++ b/src/digest.c @@ -19,6 +19,7 @@ int search_header_end(char *p, int n){ int hdr_len=0; + char *q = p; if(n < 5) return hdr_len; @@ -28,7 +29,7 @@ int search_header_end(char *p, int n){ hdr_len++; } - return 0; + if(*(p-1) == '\n' && strcasestr(q, "Message-ID:")) return n; else return 0; }