SOURCES: vixie-cron-content_type.patch (NEW) - take $CONTENT_TYPE ...

glen glen at pld-linux.org
Thu Oct 18 19:51:58 CEST 2007


Author: glen                         Date: Thu Oct 18 17:51:58 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- take $CONTENT_TYPE env to specify email Content-Type header

---- Files affected:
SOURCES:
   vixie-cron-content_type.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/vixie-cron-content_type.patch
diff -u /dev/null SOURCES/vixie-cron-content_type.patch:1.1
--- /dev/null	Thu Oct 18 19:51:58 2007
+++ SOURCES/vixie-cron-content_type.patch	Thu Oct 18 19:51:53 2007
@@ -0,0 +1,20 @@
+--- vixie-cron-4.1/do_command.c~	2007-10-17 12:42:42.000000000 +0300
++++ vixie-cron-4.1/do_command.c	2007-10-18 20:37:12.585623733 +0300
+@@ -471,6 +471,7 @@
+ 				char	**env;
+ 				char	mailcmd[MAX_COMMAND];
+ 				char	hostname[MAXHOSTNAMELEN];
++				char	*content_type = env_get("CONTENT_TYPE", e->envp);
+ 
+ 				gethostname(hostname, MAXHOSTNAMELEN);
+ 				if (strlens(MAILFMT, MAILARG, NULL) + 1
+@@ -492,6 +493,9 @@
+ 				fprintf(mail, "Date: %s\n",
+ 					arpadate(&StartTime));
+ #endif /*MAIL_DATE*/
++				if (content_type) {
++					fprintf(mail, "Content-Type: %s\n", content_type);
++				}
+ 				for (env = e->envp;  *env;  env++)
+ 					fprintf(mail, "X-Cron-Env: <%s>\n",
+ 						*env);
================================================================


More information about the pld-cvs-commit mailing list