/*
- * $Id$
- *
* Handles GroupDAV PUT requests.
*
+ * Copyright (c) 2005-2010 by the citadel.org team
+ *
+ * This program is open source software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "webcit.h"
hprintf("HTTP/1.1 502 Bad Gateway\r\n");
groupdav_common_headers();
hprintf("Content-type: text/plain\r\n");
- wprintf("%s\r\n", &buf[4]);
+ begin_burst();
+ wc_printf("%s\r\n", &buf[4]);
end_burst();
return;
}
hprintf("HTTP/1.1 404 not found\r\n");
groupdav_common_headers();
hprintf("Content-Type: text/plain\r\n");
- wprintf("The object you requested was not found.\r\n");
+ begin_burst();
+ wc_printf("The object you requested was not found.\r\n");
end_burst();
return;
}
}
/* Go to the correct room. */
- if (strcasecmp(ChrPtr(WC->wc_roomname), ChrPtr(dav_roomname))) {
+ if (strcasecmp(ChrPtr(WC->CurRoom.name), ChrPtr(dav_roomname))) {
gotoroom(dav_roomname);
}
- if (strcasecmp(ChrPtr(WC->wc_roomname), ChrPtr(dav_roomname))) {
+ if (strcasecmp(ChrPtr(WC->CurRoom.name), ChrPtr(dav_roomname))) {
hprintf("HTTP/1.1 404 not found\r\n");
groupdav_common_headers();
hprintf("Content-Type: text/plain\r\n");
- wprintf("There is no folder called \"%s\" on this server.\r\n",
+ begin_burst();
+ wc_printf("There is no folder called \"%s\" on this server.\r\n",
ChrPtr(dav_roomname));
end_burst();
FreeStrBuf(&dav_roomname);
lprintf(9, "HTTP/1.1 412 Precondition Failed (ifmatch=%ld, old_msgnum=%ld)\r\n",
StrTol(WCC->Hdr->HR.dav_ifmatch), old_msgnum);
groupdav_common_headers();
- hprintf("Content-Length: 0\r\n");
+
end_burst();
FreeStrBuf(&dav_roomname);
FreeStrBuf(&dav_uid);
hprintf("HTTP/1.1 502 Bad Gateway\r\n");
groupdav_common_headers();
hprintf("Content-type: text/plain\r\n");
-
- wprintf("%s\r\n", &buf[4]);
+ begin_burst();
+ wc_printf("%s\r\n", &buf[4]);
end_burst();
return;
}
hprintf("HTTP/1.1 502 Bad Gateway\r\n");
groupdav_common_headers();
hprintf("Content-type: text/plain\r\n");
- wprintf("new_msgnum is %ld\r\n"
+ begin_burst();
+ wc_printf("new_msgnum is %ld\r\n"
"\r\n", new_msgnum);
end_burst();
FreeStrBuf(&dav_roomname);
groupdav_common_headers();
hprintf("etag: \"%ld\"\r\n", new_msgnum);
hprintf("Location: ");
- groupdav_identify_host();
+ groupdav_identify_hosthdr();
hprintf("/groupdav/");/* TODO */
hurlescputs(ChrPtr(dav_roomname));
euid_escapize(escaped_uid, ChrPtr(dav_uid));