+# Copyright (c) 1996-2023 by the citadel.org team
+#
+# This program is open source software. Use, duplication, or
+# disclosure are subject to the GNU General Public License v3.
+
CFLAGS := $(CFLAGS) -ggdb -Wno-format-truncation
LDFLAGS := $(LDFLAGS)
Method URL Function
------ ------------------------------ -------------------------------------
GET / Site root will redirect to a landing page
+
GET /ctdl/f/ returns a JSON-encoded list of accessible floors
+
GET /ctdl/r/ returns a JSON-encoded list of accessible rooms
OPTIONS /ctdl/r/<roomname>/ returns just what you'd expect
PROPFIND /ctdl/r/<roomname>/ Show a bunch of crap
GET /ctdl/r/<roomname>/<msgnum> Retrieve the content of an individual message
GET /ctdl/r/<roomname>/<msgnum>/json Retrieve an individual message in a room, encapsulated in JSON
GET /ctdl/r/<roomname>/<msgnum>/<part> Retrieve a MIME component of a message, specified by partnum
-DELETE /ctdl/r/<roomname>/<msgnum> Deletes a message from a room
-MOVE /ctdl/r/<roomname>/<msgnum> Moves a message to another room (requires Destination)
+DELETE /ctdl/r/<roomname>/<msgnum> Delete a message from a room
+MOVE /ctdl/r/<roomname>/<msgnum> Move a message to another room (requires Destination)
PUT /ctdl/r/<roomname>/<xxx> DAV operation to insert a new message into a room
Accepted parameters:
// Called by caldav_report() to output a single item.
// Our policy is to throw away the list of properties the client asked for, and just send everything.
-void caldav_response(struct http_transaction *h, struct ctdlsession *c, StrBuf * ReportOut, StrBuf * ThisHref) {
+void caldav_response(struct http_transaction *h, struct ctdlsession *c, StrBuf *ReportOut, StrBuf *ThisHref) {
long msgnum;
StrBuf *Caldata = NULL;
char *euid;
if (msglist) {
int i;
for (i = 0; (msglist[i] > 0); ++i) {
- if ((i % 10) == 0)
+ if ((i % 10) == 0) {
syslog(LOG_DEBUG, "PROPFIND enumerated %d messages", i);
- e = NULL; // EUID gets stored here
+ }
+ e = NULL; // EUID gets stored here
timestamp = 0;
char cbuf[1024];