changeset 3676:617213ed79b5 HEAD

If message header ends unexpectedly, return it anyway instead of ignoring it completely.
author Timo Sirainen <tss@iki.fi>
date Thu, 27 Oct 2005 15:11:11 +0300
parents bcefda9b7745
children 6f58deb34e8a
files src/lib-mail/message-parser.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-mail/message-parser.c	Thu Oct 27 15:05:27 2005 +0300
+++ b/src/lib-mail/message-parser.c	Thu Oct 27 15:11:11 2005 +0300
@@ -748,6 +748,12 @@
 
 		if (ret <= 0 && startpos == size) {
 			if (ret == -1) {
+				if (startpos > 0) {
+					/* header ended unexpectedly. */
+					line->no_newline = TRUE;
+					ctx->skip = startpos;
+					break;
+				}
 				/* error / EOF with no bytes */
 				return -1;
 			}