From ae6cddd2ff16f7056db3c773a96f20bc77f5d2c3 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Thu, 15 Dec 2011 17:11:47 -0500 Subject: [PATCH] Began tweaking out some calendar stuff in preparation for CalDAV. Mike Shaver is an arrogant, self-important asshole. --- webcit/dav_options.c | 5 +++++ webcit/dav_propfind.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/webcit/dav_options.c b/webcit/dav_options.c index 11b7088d3..ada3e41ef 100644 --- a/webcit/dav_options.c +++ b/webcit/dav_options.c @@ -42,10 +42,12 @@ void dav_options(void) StrBufExtract_token(dav_roomname, WCC->Hdr->HR.ReqLine, 0, '/'); StrBufExtract_token(dav_uid, WCC->Hdr->HR.ReqLine, 1, '/'); + syslog(LOG_DEBUG, "\033[35m%s (logged_in=%d)\033[0m", ChrPtr(WCC->Hdr->HR.ReqLine), WC->logged_in); /* * If the room name is blank, the client is doing an OPTIONS on the root. */ if (StrLength(dav_roomname) == 0) { + syslog(LOG_DEBUG, "\033[36mOPTIONS requested for root\033[0m"); hprintf("HTTP/1.1 200 OK\r\n"); dav_common_headers(); hprintf("Date: %s\r\n", datestring); @@ -65,6 +67,7 @@ void dav_options(void) } if (strcasecmp(ChrPtr(WC->CurRoom.name), ChrPtr(dav_roomname))) { + syslog(LOG_DEBUG, "\033[36mOPTIONS requested for invalid item\033[0m"); hprintf("HTTP/1.1 404 not found\r\n"); dav_common_headers(); hprintf("Date: %s\r\n", datestring); @@ -85,6 +88,7 @@ void dav_options(void) * a specific item in the room. */ if (StrLength(dav_uid) != 0) { + syslog(LOG_DEBUG, "\033[36mOPTIONS requested for specific item\033[0m"); dav_msgnum = locate_message_by_uid(ChrPtr(dav_uid)); if (dav_msgnum < 0) { hprintf("HTTP/1.1 404 not found\r\n"); @@ -121,6 +125,7 @@ void dav_options(void) * We got to this point, which means that the client is requesting * an OPTIONS on the room itself. */ + syslog(LOG_DEBUG, "\033[36mOPTIONS requested for room\033[0m"); hprintf("HTTP/1.1 200 OK\r\n"); dav_common_headers(); hprintf("Date: %s\r\n", datestring); diff --git a/webcit/dav_propfind.c b/webcit/dav_propfind.c index ebf667068..96129045c 100644 --- a/webcit/dav_propfind.c +++ b/webcit/dav_propfind.c @@ -452,6 +452,8 @@ void dav_propfind(void) char datestring[256]; time_t now; + syslog(LOG_DEBUG, "PROPFIND\n\033[31m%s\033[0m", ChrPtr(WCC->upload)); + now = time(NULL); http_datestring(datestring, sizeof datestring, now); @@ -491,7 +493,7 @@ void dav_propfind(void) /* If dav_uid is non-empty, client is requesting a PROPFIND on * a specific item in the room. This is not valid GroupDAV, but - * it is valid WebDAV. + * it is valid WebDAV (and probably CalDAV too). */ if (StrLength(dav_uid) != 0) { -- 2.30.2