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.
pull/163/head
Leah Neukirchen 5 years ago
parent 5b0755ca68
commit 5fa9a7a706

@ -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);

Loading…
Cancel
Save