From: Art Cancro Date: Mon, 6 Nov 2023 22:57:44 +0000 (-0500) Subject: Fixed the MIME boundary after the message text. X-Git-Tag: v997~95 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=6d25b93821513a9e3d3b5a0f1f242ef06c9973c9 Fixed the MIME boundary after the message text. 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. --- diff --git a/webcit-ng/server/messages.c b/webcit-ng/server/messages.c index f3cba7c66..b0c265ccd 100644 --- a/webcit-ng/server/messages.c +++ b/webcit-ng/server/messages.c @@ -279,7 +279,7 @@ void dav_put_message(struct http_transaction *h, struct ctdlsession *c, char *eu // 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");