From 6d25b93821513a9e3d3b5a0f1f242ef06c9973c9 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Mon, 6 Nov 2023 17:57:44 -0500 Subject: [PATCH] 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. --- webcit-ng/server/messages.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"); -- 2.30.2