]> code.citadel.org Git - citadel.git/blobdiff - webcit-ng/messages.c
Begin gathering references and message IDs for replies
[citadel.git] / webcit-ng / messages.c
index ed88c9970ed2d1764669059347ab5a7e4e153f5d..5ecfc165fdf39d4083aab4db1192a72b03e534cd 100644 (file)
@@ -157,13 +157,15 @@ void dav_put_message(struct http_transaction *h, struct ctdlsession *c, char *eu
                return;
        }
 
-       // Remember, ctdl_printf() appends \n on its own, so we only need \r here.
+       // Remember, ctdl_printf() appends \n on its own, so when adding a CRLF newline, only use \r
+       // Or for a blank line, use ctdl_write() with \r\n
+
        content_type = header_val(h, "Content-type");
        ctdl_printf(c, "Content-type: %s\r", (content_type ? content_type : "application/octet-stream"));
-       ctdl_printf(c, "\r");
+       ctdl_write(c, HKEY("\r\n"));
        ctdl_write(c, h->request_body, h->request_body_length);
        if (h->request_body[h->request_body_length] != '\n') {
-               ctdl_printf(c, "\r");
+               ctdl_write(c, HKEY("\r\n"));
        }
        ctdl_printf(c, "000");