[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync-parse.c, 1.50, 1.51

cras at dovecot.org cras at dovecot.org
Sat Jun 17 20:11:34 EEST 2006


Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv1489/lib-storage/index/mbox

Modified Files:
	mbox-sync-parse.c 
Log Message:
If mbox headers have CRLF linefeeds, handle them properly instead of
corrupting the headers.



Index: mbox-sync-parse.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync-parse.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- mbox-sync-parse.c	8 Jun 2006 16:59:44 -0000	1.50
+++ mbox-sync-parse.c	17 Jun 2006 17:11:30 -0000	1.51
@@ -510,8 +510,11 @@
 			buffer_append(ctx->header, hdr->value,
 				      hdr->value_len);
 		}
-		if (!hdr->no_newline)
+		if (!hdr->no_newline) {
+			if (hdr->crlf_newline)
+				str_append_c(ctx->header, '\r');
 			str_append_c(ctx->header, '\n');
+		}
 	}
 	i_assert(ret != 0);
 	message_parse_header_deinit(&hdr_ctx);



More information about the dovecot-cvs mailing list