X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fdav_propfind.c;h=b3a848a9ddf80cbb2e0cb1abd002eb14aadadd03;hb=HEAD;hp=64e7a1297c470d22860661d3e1cf74002a0acb10;hpb=7d548835437de5f5ea26884af56982cb1c8af673;p=citadel.git diff --git a/webcit/dav_propfind.c b/webcit/dav_propfind.c index 64e7a1297..b09b52c17 100644 --- a/webcit/dav_propfind.c +++ b/webcit/dav_propfind.c @@ -13,24 +13,9 @@ * References: * http://www.ietf.org/rfc/rfc4791.txt * http://blogs.nologin.es/rickyepoderi/index.php?/archives/14-Introducing-CalDAV-Part-I.html - -Sample query: - -PROPFIND /groupdav/calendar/ HTTP/1.1 -Content-type: text/xml; charset=utf-8 -Content-length: 166 - - - - - - - - - - + * https://msdn.microsoft.com/en-us/library/aa142960(v=exchg.65).aspx * - * Copyright (c) 2005-2012 by the citadel.org team + * Copyright (c) 2005-2017 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 version 3. @@ -42,7 +27,7 @@ Content-length: 166 */ #include "webcit.h" -#include "webserver.h" + #include "dav.h" /* @@ -383,8 +368,7 @@ void dav_collection_list(void) (view == VIEW_ADDRESSBOOK) || (view == VIEW_NOTES) || (view == VIEW_JOURNAL) || - (view == VIEW_WIKI) || - (view == VIEW_WIKIMD) + (view == VIEW_WIKI) ) { is_groupware_collection = 1; } @@ -426,7 +410,6 @@ void dav_collection_list(void) wc_printf(""); break; case VIEW_WIKI: - case VIEW_WIKIMD: wc_printf(""); break; } @@ -725,14 +708,18 @@ void dav_propfind(void) if (!IsEmptyStr(uid)) { wc_printf(""); - wc_printf(""); - dav_identify_host(); - wc_printf("/groupdav/"); - urlescputs(ChrPtr(WCC->CurRoom.name)); - euid_escapize(encoded_uid, uid); - wc_printf("/%s", encoded_uid); - wc_printf(""); - switch(WCC->CurRoom.defview) { + wc_printf(""); + dav_identify_host(); + wc_printf("/groupdav/"); + urlescputs(ChrPtr(WCC->CurRoom.name)); + euid_escapize(encoded_uid, uid); + wc_printf("/%s", encoded_uid); + wc_printf(""); + wc_printf(""); + wc_printf("HTTP/1.1 200 OK"); + wc_printf(""); + wc_printf("\"%ld\"", msgs[i]); + switch(WCC->CurRoom.defview) { case VIEW_CALENDAR: wc_printf("text/x-ical"); break; @@ -742,19 +729,15 @@ void dav_propfind(void) case VIEW_ADDRESSBOOK: wc_printf("text/x-vcard"); break; - } - wc_printf(""); - wc_printf("HTTP/1.1 200 OK"); - wc_printf(""); - wc_printf("\"%ld\"", msgs[i]); - if (now > 0L) { - http_datestring(datestring, sizeof datestring, now); - wc_printf(""); - escputs(datestring); - wc_printf(""); - } - wc_printf(""); - wc_printf(""); + } + if (now > 0L) { + http_datestring(datestring, sizeof datestring, now); + wc_printf(""); + escputs(datestring); + wc_printf(""); + } + wc_printf(""); + wc_printf(""); wc_printf(""); } } @@ -774,7 +757,8 @@ void dav_propfind(void) int ParseMessageListHeaders_EUID(StrBuf *Line, const char **pos, message_summary *Msg, - StrBuf *ConversionBuffer) + StrBuf *ConversionBuffer, + void **ViewSpecific) { Msg->euid = NewStrBuf(); StrBufExtract_NextToken(Msg->euid, Line, pos, '|'); @@ -830,10 +814,11 @@ InitModule_PROPFIND eReadEUIDS, DavUIDL_GetParamsGetServerCall, NULL, - NULL, /// TODO: is this right? + NULL, ParseMessageListHeaders_EUID, - NULL, //// "" + NULL, DavUIDL_RenderView_or_Tail, - DavUIDL_Cleanup); + DavUIDL_Cleanup, + NULL); }