X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fdav_options.c;h=b5f35abbc9b1281c31fd60a8bf6b8094b251c762;hb=ad672426410571cb1f73d923743f23c90bc47611;hp=11b7088d3f5756507b0d35c5f66520a462c886e8;hpb=555e71676126d632725bf497b33e70fe63bb4599;p=citadel.git diff --git a/webcit/dav_options.c b/webcit/dav_options.c index 11b7088d3..b5f35abbc 100644 --- a/webcit/dav_options.c +++ b/webcit/dav_options.c @@ -43,7 +43,7 @@ void dav_options(void) StrBufExtract_token(dav_uid, WCC->Hdr->HR.ReqLine, 1, '/'); /* - * If the room name is blank, the client is doing an OPTIONS on the root. + * If the room name is blank, the client is doing a top-level OPTIONS. */ if (StrLength(dav_roomname) == 0) { hprintf("HTTP/1.1 200 OK\r\n"); @@ -85,6 +85,7 @@ void dav_options(void) * a specific item in the room. */ if (StrLength(dav_uid) != 0) { + dav_msgnum = locate_message_by_uid(ChrPtr(dav_uid)); if (dav_msgnum < 0) { hprintf("HTTP/1.1 404 not found\r\n"); @@ -124,17 +125,7 @@ void dav_options(void) 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) ) { - hprintf("DAV: 1, calendar-access\r\n"); - } - else { - hprintf("DAV: 1\r\n"); - } - + hprintf("DAV: 1\r\n"); hprintf("Allow: OPTIONS, PROPFIND, GET, PUT\r\n"); begin_burst(); wc_printf("\r\n");