It had the trailing dashes in it, so it was getting interpreted as the end of the message.
Now that's corrected and the parsers of the world are happy.
Also, we eliminated the double-nesting thing, and everything is hunky dory now.
// The file descriptor has zero links, so when we close it, the filesystem will remove it from disk.
syslog(LOG_DEBUG, "💥 attachment: %s , len=%ld", one_att.filename, one_att.length);
// The file descriptor has zero links, so when we close it, the filesystem will remove it from disk.
syslog(LOG_DEBUG, "💥 attachment: %s , len=%ld", one_att.filename, one_att.length);
- ctdl_printf(c, "--%s--\r", mime_boundary);
+ ctdl_printf(c, "--%s\r", mime_boundary);
ctdl_printf(c, "Content-Type: %s; name=\"%s\"\r", one_att.content_type, one_att.filename);
ctdl_printf(c, "Content-Disposition: attachment; filename=\"%s\"\r", one_att.filename);
ctdl_printf(c, "Content-Transfer-Encoding: base64\r");
ctdl_printf(c, "Content-Type: %s; name=\"%s\"\r", one_att.content_type, one_att.filename);
ctdl_printf(c, "Content-Disposition: attachment; filename=\"%s\"\r", one_att.filename);
ctdl_printf(c, "Content-Transfer-Encoding: base64\r");