diff options
Diffstat (limited to 'camel')
-rw-r--r-- | camel/ChangeLog | 3 | ||||
-rw-r--r-- | camel/providers/imap/camel-imap-folder.c | 9 |
2 files changed, 9 insertions, 3 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index bc15521a81..eab94447d8 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -3,6 +3,9 @@ * providers/imap/camel-imap-folder.c (imap_sync): If we don't change any flags or expunge, send a NOOP to give the server a chance to send EXISTS, etc, messages. + (imap_get_message): If the server_level < IMAP4rev1, always fetch + messages all-at-once, since they don't support the [#.MIME] + syntax. 2001-04-02 Dan Winship <danw@ximian.com> diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c index 0a8f0edd66..b05dcfb5e4 100644 --- a/camel/providers/imap/camel-imap-folder.c +++ b/camel/providers/imap/camel-imap-folder.c @@ -947,6 +947,7 @@ static CamelMimeMessage * imap_get_message (CamelFolder *folder, const char *uid, CamelException *ex) { CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (folder); + CamelImapStore *store = CAMEL_IMAP_STORE (folder->parent_store); CamelMessageInfo *mi; CamelMimeMessage *msg; CamelStream *stream; @@ -954,8 +955,11 @@ imap_get_message (CamelFolder *folder, const char *uid, CamelException *ex) mi = camel_folder_summary_uid (folder->summary, uid); g_return_val_if_fail (mi != NULL, NULL); - /* Fetch small messages directly. */ - if (mi->size < IMAP_SMALL_BODY_SIZE) { + /* If the message is small, or the server doesn't support + * IMAP4rev1, fetch it in one piece. + */ + if (mi->size < IMAP_SMALL_BODY_SIZE || + store->server_level < IMAP_LEVEL_IMAP4REV1) { camel_folder_summary_info_free (folder->summary, mi); stream = camel_imap_folder_fetch_data (imap_folder, uid, "", FALSE, ex); if (!stream) @@ -972,7 +976,6 @@ imap_get_message (CamelFolder *folder, const char *uid, CamelException *ex) * an empty content struct.) */ if (!mi->content->type) { - CamelImapStore *store = CAMEL_IMAP_STORE (folder->parent_store); CamelImapResponse *response; GData *fetch_data; char *body, *found_uid; |