summaryrefslogtreecommitdiffstats
path: root/sqwebmail/msg2html.c
diff options
context:
space:
mode:
authorSam Varshavchik2015-03-04 20:10:05 -0500
committerSam Varshavchik2015-03-04 20:10:05 -0500
commit070a5986a3ada0cd6cbb74c77f4e41ed3c4eb48c (patch)
tree96f6fe07a4a3be2812f20feb5611d6efdf820e95 /sqwebmail/msg2html.c
parent0feb9a21453515e53fbf024fd09455af42d01bf1 (diff)
downloadcourier-libs-070a5986a3ada0cd6cbb74c77f4e41ed3c4eb48c.tar.bz2
imap: handle 01-Jan-1970 as a valid search date.
Diffstat (limited to 'sqwebmail/msg2html.c')
-rw-r--r--sqwebmail/msg2html.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/sqwebmail/msg2html.c b/sqwebmail/msg2html.c
index f5b703b..f58df1d 100644
--- a/sqwebmail/msg2html.c
+++ b/sqwebmail/msg2html.c
@@ -215,7 +215,7 @@ static void show_email_header(const char *h)
}
static void print_header_uc(struct msg2html_info *info, char *h)
-{
+{
header_uc(h);
printf("<tr valign=\"baseline\"><th align=\"right\" class=\"message-rfc822-header-name\">");
@@ -588,10 +588,13 @@ off_t pos;
if (save_date)
{
- time_t t=rfc822_parsedt(save_date);
- struct tm *tmp=t ? localtime(&t):0;
+ time_t t;
+ struct tm *tmp=0;
char date_buf[256];
+ if (rfc822_parsedate_chk(save_date, &t) == 0)
+ tmp=localtime(&t);
+
if (tmp)
{
char date_header[10];
@@ -780,7 +783,7 @@ int gpg_status;
{
if (q->isdummy) continue;
-
+
if (nextpart.idnum == 1)
{
printf("<blockquote class=\"%s\">",
@@ -2796,7 +2799,7 @@ msg2html_textplain_start(const char *message_charset,
{
struct msg2html_textplain_info *tinfo=
malloc(sizeof(struct msg2html_textplain_info));
-
+
memset(tinfo, 0, sizeof(*tinfo));
tinfo->flowed=isflowed;
@@ -3018,7 +3021,7 @@ static int download_func(const char *, size_t, void *);
static void disposition_attachment(FILE *fp, const char *p, int attachment)
{
- fprintf(fp, "Content-Disposition: %s; filename=\"",
+ fprintf(fp, "Content-Disposition: %s; filename=\"",
attachment ? "attachment":"inline");
while (*p)
{