]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Fixes for fetching BODY[n], patch by Rick Jones
authorTimo Sirainen <tss@iki.fi>
Sun, 25 Apr 2004 22:30:25 +0000 (01:30 +0300)
committerTimo Sirainen <tss@iki.fi>
Sun, 25 Apr 2004 22:30:25 +0000 (01:30 +0300)
--HG--
branch : HEAD

src/imap/imap-fetch-body-section.c

index a466738f537f4ddaf3dfba6a1e6a47711940cc67..5e16dfc676924778d12a9ed072f4c4baee56638b 100644 (file)
@@ -462,8 +462,10 @@ static int part_find(struct mail *mail, const struct imap_fetch_body_data *body,
                }
 
                if (part != NULL &&
-                   (part->flags & MESSAGE_PART_FLAG_MESSAGE_RFC822)) {
-                       /* skip the message/rfc822 part */
+                   (part->flags & MESSAGE_PART_FLAG_MESSAGE_RFC822) &&
+                   (*path >= '0' && *path <= '9' || strncmp(path, "HEADER", 6) == 0)) {
+                       /* if remainder of path is a number or "HEADER",
+                               skip the message/rfc822 part */
                        part = part->children;
                }
        }