[dovecot-cvs] dovecot/src/lib-mail message-parser.c,1.40,1.41

cras at procontrol.fi cras at procontrol.fi
Wed Jun 4 18:47:24 EEST 2003


Update of /home/cvs/dovecot/src/lib-mail
In directory danu:/tmp/cvs-serv27912

Modified Files:
	message-parser.c 
Log Message:
message_parse_header(): skip all LWSP after ':' or in continued header. It's
not what RFC2822 says, but it's historically better behaviour.



Index: message-parser.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-mail/message-parser.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- message-parser.c	22 May 2003 23:04:41 -0000	1.40
+++ message-parser.c	4 Jun 2003 14:47:22 -0000	1.41
@@ -695,11 +695,12 @@
 		line->name = str_c(ctx->name);
 		line->name_len = str_len(ctx->name);
 	} else {
-		/* get value, skip only first LWSP after ':' */
+		/* get value. skip all LWSP after ':'. Note that RFC2822
+		   doesn't say we should, but history behind it.. */
 		line->value = msg + colon_pos+1;
 		line->value_len = size - colon_pos - 1;
-		if (line->value_len > 0 &&
-		    IS_LWSP(line->value[0])) {
+		while (line->value_len > 0 &&
+		       IS_LWSP(line->value[0])) {
 			line->value++;
 			line->value_len--;
 		}



More information about the dovecot-cvs mailing list