changeset 324:af441b7d0e69

Make header match case insensitive
author mmj
date Thu, 09 Sep 2004 08:11:14 +1000
parents ef48b0eb6d75
children 1bbb75dfcea8
files ChangeLog src/do_all_the_voodo_here.c
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Sep 09 07:48:09 2004 +1000
+++ b/ChangeLog	Thu Sep 09 08:11:14 2004 +1000
@@ -1,4 +1,5 @@
 1.0.0
+ o Make header matching case insensitive
  o Fix dumping of addresses to requeue
  o Make the time an address can bounce before unsubscribed configurable with
    listdir/control/bouncelife
--- a/src/do_all_the_voodo_here.c	Thu Sep 09 07:48:09 2004 +1000
+++ b/src/do_all_the_voodo_here.c	Thu Sep 09 08:11:14 2004 +1000
@@ -43,7 +43,7 @@
 
 	while(headers[i]) {
 		len = strlen(headers[i]);
-		if(strncmp(line, headers[i], len) == 0)
+		if(strncasecmp(line, headers[i], len) == 0)
 			return 1;
 		i++;
 	}
@@ -59,7 +59,7 @@
 	while(readhdrs[i].token) {
 		tokenlen = strlen(readhdrs[i].token);
 		linelen = strlen(line);
-		if(strncmp(line, readhdrs[i].token, tokenlen) == 0) {
+		if(strncasecmp(line, readhdrs[i].token, tokenlen) == 0) {
 			readhdrs[i].valuecount++;
 			valuelen = linelen - tokenlen + 1;
 			readhdrs[i].values =
@@ -125,7 +125,7 @@
 
 		/* Add Subject: prefix if wanted */
 		if(prefix) {
-			if(strncmp(hdrline, "Subject: ", 9) == 0) {
+			if(strncasecmp(hdrline, "Subject: ", 9) == 0) {
 				unqp = cleanquotedp(hdrline + 9);
 				if(strstr(hdrline + 9, prefix) == NULL &&
 				   strstr(unqp, prefix) == NULL) {