Commit Diff


commit - b6e37a5eeac178c8d2423aef719ca60a89b6b6dc
commit + 63ac36cedf1a1cc5fa99dbf504b116c4839128d9
blob - ad535ff8f8ec2d42b09469ab4cfab91b0bce33c0
blob + 82c377078b8126696a7ce446370bcd1639c46cb8
--- main.c
+++ main.c
@@ -486,6 +486,7 @@ dkim_parse_header(struct dkim_session *session, char *
 	int fieldname = 0;
 	char **mtmp;
 	char *htmp;
+	char *tmp;
 
 	if ((line[0] == ' ' || line[0] == '\t') && !session->lastheader)
 		return;
@@ -567,7 +568,11 @@ dkim_parse_header(struct dkim_session *session, char *
 		if (canonheader == CANON_SIMPLE) {
 			if (strlcat(htmp, "\r\n", linelen) >= linelen)
 				fatalx("Missized header");
-		}
+		} else if (canonheader == CANON_RELAXED &&
+		    (tmp = strchr(session->headers[lastheader], ':')) != NULL &&
+		    tmp[1] == '\0')
+			line++;
+
 		if (strlcat(htmp, line, linelen) >= linelen)
 			fatalx("Missized header");
 	}