* If the room name is blank, the client is requesting a
* folder list.
*/
- if (strlen(dav_roomname) == 0) {
+ if (IsEmptyStr(dav_roomname)) {
groupdav_collection_list(dav_pathname, dav_depth);
return;
}
* a specific item in the room. This is not valid GroupDAV, but
* it is valid WebDAV.
*/
- if (strlen(dav_uid) > 0) {
+ if (!IsEmptyStr(dav_uid)) {
dav_msgnum = locate_message_by_uid(dav_uid);
if (dav_msgnum < 0) {
);
wprintf("<response>");
-
+
wprintf("<href>");
groupdav_identify_host();
wprintf("/groupdav/");
}
}
- if (strlen(uid) > 0) {
+ if (!IsEmptyStr(uid)) {
wprintf("<response>");
wprintf("<href>");
groupdav_identify_host();
euid_escapize(encoded_uid, uid);
wprintf("/%s", encoded_uid);
wprintf("</href>");
+ switch(WC->wc_default_view) {
+ case VIEW_CALENDAR:
+ wprintf("<getcontenttype>text/x-ical</getcontenttype>");
+ break;
+ case VIEW_TASKS:
+ wprintf("<getcontenttype>text/x-ical</getcontenttype>");
+ break;
+ case VIEW_ADDRESSBOOK:
+ wprintf("<getcontenttype>text/x-vcard</getcontenttype>");
+ break;
+ }
wprintf("<propstat>");
wprintf("<status>HTTP/1.1 200 OK</status>");
wprintf("<prop>");