void dav_put_message(struct http_transaction *h, struct ctdlsession *c, char *euid, long old_msgnum) {
char buf[1024];
char *content_type = NULL;
- char *content_transfer_encoding = NULL;
int n;
long new_msgnum;
char new_euid[1024];
content_type = header_val(h, "Content-type");
ctdl_printf(c, "Content-type: %s\r\n", (content_type ? content_type : "application/octet-stream"));
-
- content_transfer_encoding = header_val(h, "Content-Transfer-Encoding");
- if (!IsEmptyStr(content_transfer_encoding)) {
- ctdl_printf(c, "Content-Transfer-Encoding: %s\r\n", content_transfer_encoding);
- }
-
ctdl_printf(c, "\r\n");
ctdl_write(c, h->request_body, h->request_body_length);
if (h->request_body[h->request_body_length] != '\n') {
}
-// Save the posted message to the server
-function Xsave_message(div_name, reply_to_msgnum) {
- msg_text = "<html><body>" + document.getElementById("ctdl-editor-body").innerHTML + "</body></html>\n";
- m = btoa(msg_text);
- alert(m);
-}
-
-
// Save the posted message to the server
function save_message(div_name, reply_to_msgnum) {
msg_text = "<html><body>" + document.getElementById("ctdl-editor-body").innerHTML + "</body></html>\n";
var request = new XMLHttpRequest();
request.open("PUT", url, true);
request.setRequestHeader("Content-type", "text/html");
- request.setRequestHeader("Content-length", msg_text.length);
request.onreadystatechange = function() {
if (request.readyState == 4) {
if (Math.trunc(request.status / 100) == 2) {