Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't fail on empty part, just return zero length #1621

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

serjepatoff
Copy link
Contributor

Outlook.com IMAP server omits some parts and returns them as zero-length ones if there is vCalendar part in the message.

IMAP dump and message content is in the attachment.
Attachment.zip

@@ -2050,8 +2050,9 @@ fetch_imap(mailimap * imap, bool identifier_is_uid, uint32_t identifier,

mailimap_fetch_list_free(fetch_result);

if (text == NULL)
return MAILIMAP_ERROR_FETCH;
if (text == NULL) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you enable that behavior only if outlook server is detected?

@dinhvh
Copy link
Member

dinhvh commented Apr 24, 2017

Sorry for not getting back to you earlier. This pull request somehow went out of my focus.

@@ -1,4 +1,4 @@
## MailCore 2: Introduction ##
## MailCore 2: Introduction ##
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you revert that part?

@@ -322,6 +325,8 @@ namespace mailcore {
bool wholePart, uint32_t offset, uint32_t length,
Encoding encoding, IMAPProgressCallback * progressCallback, ErrorCode * pError);
void storeLabels(String * folder, bool identifier_is_uid, IndexSet * identifiers, IMAPStoreFlagsRequestKind kind, Array * labels, ErrorCode * pError);
int fetch_rfc822(mailimap * session, bool identifier_is_uid, uint32_t identifier, char ** result, size_t * result_len);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are those part of the change?

@@ -8,6 +8,8 @@

#ifdef __cplusplus

typedef struct mailimap_fetch_type mailimap_fetch_type;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer if that data type wasn't public.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants