fixed a bug for detecting the header size for messages without body

This commit is contained in:
SJ 2014-02-09 22:00:52 +01:00
parent ae2037d06c
commit 36565b887b

View File

@ -19,6 +19,7 @@
int search_header_end(char *p, int n){ int search_header_end(char *p, int n){
int hdr_len=0; int hdr_len=0;
char *q = p;
if(n < 5) return hdr_len; if(n < 5) return hdr_len;
@ -28,7 +29,7 @@ int search_header_end(char *p, int n){
hdr_len++; hdr_len++;
} }
return 0; if(*(p-1) == '\n' && strcasestr(q, "Message-ID:")) return n; else return 0;
} }