From: Thomas Roessler Date: Mon, 24 Apr 2000 13:09:33 +0000 (+0000) Subject: Fall back to INTERNALDATE when Date header isn't present. From X-Git-Tag: mutt-1-1-13-rel~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=996ba0df97d49766a7467020b253290970df2ea2;p=mutt Fall back to INTERNALDATE when Date header isn't present. From Brendan. --- diff --git a/imap/message.c b/imap/message.c index fe15b45e..d1cff077 100644 --- a/imap/message.c +++ b/imap/message.c @@ -233,7 +233,6 @@ int imap_read_headers (CONTEXT *ctx, int msgbegin, int msgend) ctx->hdrs[ctx->msgcount] = mutt_new_header (); ctx->hdrs[ctx->msgcount]->index = ctx->msgcount; - ctx->hdrs[msgno]->env = mutt_read_rfc822_header (fp, ctx->hdrs[msgno], 0, 0); ploc = ftell (fp); ctx->hdrs[msgno]->read = h->read; ctx->hdrs[msgno]->old = h->old; @@ -242,9 +241,14 @@ int imap_read_headers (CONTEXT *ctx, int msgbegin, int msgend) ctx->hdrs[msgno]->replied = h->replied; ctx->hdrs[msgno]->changed = h->changed; ctx->hdrs[msgno]->received = h->received; - ctx->hdrs[msgno]->content->length = h->content_length; ctx->hdrs[msgno]->data = (void *) (h->data); + /* NOTE: if Date: header is missing, mutt_read_rfc822_header depends + * on h->received being set */ + ctx->hdrs[msgno]->env = mutt_read_rfc822_header (fp, ctx->hdrs[msgno], 0, 0); + /* content built as a side-effect of mutt_read_rfc822_header */ + ctx->hdrs[msgno]->content->length = h->content_length; + mx_update_context (ctx); /* increments ->msgcount */ h0 = h;