about summary refs log tree commit diff
path: root/mmime.c
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2019-04-23 12:35:12 +0200
committerLeah Neukirchen <leah@vuxu.org>2019-04-23 12:35:12 +0200
commit5fa9a7a7066cce6f660a97790a160942db2b299a (patch)
tree7dbc347940d403ee5bce68bb6b3482ac56acd3ae /mmime.c
parent5b0755ca685e2b1079ecd3fc7a2df78d1ac197c9 (diff)
downloadmblaze-5fa9a7a7066cce6f660a97790a160942db2b299a.tar.gz
mblaze-5fa9a7a7066cce6f660a97790a160942db2b299a.tar.xz
mblaze-5fa9a7a7066cce6f660a97790a160942db2b299a.zip
mmime: gen_file: remove check for trailing newline for 7bit transfer
RFC2046 5.1.1 specifies that parts without trailing newlines are coded
without problems:

> NOTE:  The CRLF preceding the boundary delimiter line is conceptually
> attached to the boundary so that it is possible to have a part that
> does not end with a CRLF (line break).

This if-statement now also codes empty files correctly.
Diffstat (limited to 'mmime.c')
-rw-r--r--mmime.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mmime.c b/mmime.c
index 6188f5b..79e1ef0 100644
--- a/mmime.c
+++ b/mmime.c
@@ -246,7 +246,7 @@ gen_file(char *file, char *ct)
 	}
 
 	if (bitlow == 0 && bithigh == 0 &&
-	    maxlinelen <= 78 && content[size-1] == '\n') {
+	    maxlinelen <= 78) {
 		if (!ct)
 			ct = "text/plain";
 		printf("Content-Type: %s\n", ct);