From e848a4738e70d14a4625b18085f2b3865633c914 Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Thu, 23 Apr 2009 14:39:48 +0000 Subject: Support NIL as body length (Exchange). Fixes Berlios Bug #11980. svn path=/branches/BRANCH_6-3/; revision=5269 --- imap.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'imap.c') diff --git a/imap.c b/imap.c index dd303f78..53474924 100644 --- a/imap.c +++ b/imap.c @@ -1153,6 +1153,13 @@ static int imap_fetch_body(int sock, struct query *ctl, int number, int *lenp) if (num != number) return(PS_ERROR); + /* Understand "NIL" as length => no body present + * (MS Exchange, BerliOS Bug #11980) */ + if (strstr(buf+10, "NIL)")) { + *lenp = 0; + return PS_SUCCESS; + } + /* * Try to extract a length from the FETCH response. RFC2060 requires * it to be present, but at least one IMAP server (Novell GroupWise) -- cgit v1.2.3