All of lore.kernel.org
 help / color / mirror / Atom feed
* incorrect Date header
@ 2005-05-13 17:53 Jakob Hirsch
  2005-05-16 10:30 ` Mads Martin Joergensen
  0 siblings, 1 reply; 2+ messages in thread
From: Jakob Hirsch @ 2005-05-13 17:53 UTC (permalink / raw)
  To: mlmmj

[-- Attachment #1: Type: text/plain, Size: 132 bytes --]

Hi,

mlmmj's Date header is possibly not RFC2822 compliant (discovered by 
spamassassin, not by me). The attached patch fixes this.

[-- Attachment #2: mlmmj-date.diff --]
[-- Type: text/plain, Size: 561 bytes --]

--- strgen.c	2005-05-13 19:32:46.000000000 +0200
+++ strgen.c	2005-05-13 19:37:43.000000000 +0200
@@ -246,7 +246,6 @@

 	/* 6 + 26 + ' ' + timezone which is 5 + '\n\0' == 40 */
 	timestr = (char *)malloc(40);
-	strcpy(timestr, "Date: ");
 	t = time(NULL);

 	localtime_r(&t, &lttm);
@@ -311,7 +310,7 @@
 	}


-	snprintf(timestr, 40, "Date: %s, %02d %s %d %d:%d:%d %+05d\n",
+	snprintf(timestr, 40, "Date: %s, %02d %s %04d %02d:%02d:%02d %+05d\n",
 			weekday, lttm.tm_mday, month, lttm.tm_year + 1900,
 			lttm.tm_hour, lttm.tm_min, lttm.tm_sec, ((int)t)/36);


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-05-16 10:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-13 17:53 incorrect Date header Jakob Hirsch
2005-05-16 10:30 ` Mads Martin Joergensen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.