Fixed the MIME boundary after the message text.
authorArt Cancro <ajc@citadel.org>
Mon, 6 Nov 2023 22:57:44 +0000 (17:57 -0500)
committerArt Cancro <ajc@citadel.org>
Mon, 6 Nov 2023 22:57:44 +0000 (17:57 -0500)
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

index f3cba7c6636bbee51b64f8b080d0b7323f5702bb..b0c265ccdfd7a3749de12de42324b332f298726b 100644 (file)
@@ -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");