diff options
author | Dan Winship <danw@src.gnome.org> | 2001-04-04 05:46:32 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2001-04-04 05:46:32 +0800 |
commit | 4392191f4f48cf83d7ae44a3bfd3a51db472783a (patch) | |
tree | cb91d7be3d2128c3c489fad35345a1d0cedb7671 /camel/providers/imap | |
parent | 27def927798e072826f1dbd70dcc52fdb2a878c2 (diff) | |
download | gsoc2013-evolution-4392191f4f48cf83d7ae44a3bfd3a51db472783a.tar gsoc2013-evolution-4392191f4f48cf83d7ae44a3bfd3a51db472783a.tar.gz gsoc2013-evolution-4392191f4f48cf83d7ae44a3bfd3a51db472783a.tar.bz2 gsoc2013-evolution-4392191f4f48cf83d7ae44a3bfd3a51db472783a.tar.lz gsoc2013-evolution-4392191f4f48cf83d7ae44a3bfd3a51db472783a.tar.xz gsoc2013-evolution-4392191f4f48cf83d7ae44a3bfd3a51db472783a.tar.zst gsoc2013-evolution-4392191f4f48cf83d7ae44a3bfd3a51db472783a.zip |
(imap_get_message): If the server_level < IMAP4rev1, always fetch
messages all-at-once, since they don't support the [#.MIME]
syntax.
svn path=/trunk/; revision=9145
Diffstat (limited to 'camel/providers/imap')
-rw-r--r-- | camel/providers/imap/camel-imap-folder.c | 9 |
1 files changed, 6 insertions, 3 deletions
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; |