+
/*
* Handles DAV OPTIONS requests (experimental -- not required by GroupDAV)
*
/*
* The pathname is always going to be /groupdav/room_name/msg_num
*/
-void dav_options(void)
-{
+void dav_options(void) {
wcsession *WCC = WC;
StrBuf *dav_roomname;
StrBuf *dav_uid;
hprintf("HTTP/1.1 404 not found\r\n");
dav_common_headers();
hprintf("Date: %s\r\n", datestring);
- hprintf(
- "Content-Type: text/plain\r\n");
+ hprintf("Content-Type: text/plain\r\n");
begin_burst();
- wc_printf(
- "There is no folder called \"%s\" on this server.\r\n",
- ChrPtr(dav_roomname)
- );
+ wc_printf("There is no folder called \"%s\" on this server.\r\n", ChrPtr(dav_roomname)
+ );
end_burst();
FreeStrBuf(&dav_roomname);
FreeStrBuf(&dav_uid);
dav_common_headers();
hprintf("Content-Type: text/plain\r\n");
begin_burst();
- wc_printf(
- "Object \"%s\" was not found in the \"%s\" folder.\r\n",
- ChrPtr(dav_uid),
- ChrPtr(dav_roomname)
- );
+ wc_printf("Object \"%s\" was not found in the \"%s\" folder.\r\n", ChrPtr(dav_uid), ChrPtr(dav_roomname)
+ );
FreeStrBuf(&dav_roomname);
FreeStrBuf(&dav_uid);
- end_burst();return;
+ end_burst();
+ return;
}
hprintf("HTTP/1.1 200 OK\r\n");
hprintf("Date: %s\r\n", datestring);
hprintf("DAV: 1\r\n");
hprintf("Allow: OPTIONS, PROPFIND, GET, PUT, DELETE\r\n");
-
+
begin_burst();
end_burst();
FreeStrBuf(&dav_roomname);
* an OPTIONS on the room itself.
*/
syslog(LOG_DEBUG, "\033[36mOPTIONS requested for room '%s' (%slogged in)\033[0m",
- ChrPtr(WC->CurRoom.name),
- ((WC->logged_in) ? "" : "not ")
- );
+ ChrPtr(WC->CurRoom.name), ((WC->logged_in) ? "" : "not ")
+ );
hprintf("HTTP/1.1 200 OK\r\n");
dav_common_headers();
hprintf("Date: %s\r\n", datestring);
/*
* Offer CalDAV (RFC 4791) if this is a calendar room
*/
- if ( (WC->CurRoom.view == VIEW_CALENDAR) || (WC->CurRoom.view == VIEW_CALBRIEF) ) {
+ if ((WC->CurRoom.view == VIEW_CALENDAR) || (WC->CurRoom.view == VIEW_CALBRIEF)) {
hprintf("DAV: 1, calendar-access\r\n");
syslog(LOG_DEBUG, "\033[36mDAV: 1, calendar-access\033[0m");
}