2 * Handles GroupDAV REPORT requests.
4 * Copyright (c) 2005-2012 by the citadel.org team
6 * This program is open source software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License version 3.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
17 /* SAMPLE QUERIES TO WORK WITH *
19 REPORT /groupdav/calendar/ HTTP/1.1
20 Content-type: application/xml
23 <C:calendar-query xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:D="DAV:">
28 <C:comp-filter name="VCALENDAR">
29 <C:comp-filter name="VEVENT">
30 <C:time-range start="20111129T231445Z" end="20120207T231445Z"/>
37 REPORT /groupdav/calendar/ HTTP/1.1
38 Content-type: application/xml
41 <C:calendar-query xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:D="DAV:">
46 <C:comp-filter name="VCALENDAR">
47 <C:comp-filter name="VEVENT"/>
55 #include "webserver.h"
60 * The pathname is always going to be /groupdav/room_name/msg_num
65 time_t now = time(NULL);
67 http_datestring(datestring, sizeof datestring, now);
68 const char *req = ChrPtr(WC->upload);
70 syslog(LOG_DEBUG, "REPORT: \033[31m%s\033[0m", req);
72 hprintf("HTTP/1.1 500 Internal Server Error\r\n");
74 hprintf("Date: %s\r\n", datestring);
75 hprintf("Content-Type: text/plain\r\n");
76 wc_printf("An internal error has occurred at %s:%d.\r\n", __FILE__ , __LINE__ );
83 extern int ParseMessageListHeaders_EUID(StrBuf *Line,
86 StrBuf *ConversionBuffer);
88 extern int DavUIDL_GetParamsGetServerCall(SharedMessageStatus *Stat,
96 extern int DavUIDL_RenderView_or_Tail(SharedMessageStatus *Stat,
100 extern int DavUIDL_Cleanup(void **ViewSpecific);
108 RegisterReadLoopHandlerset(
110 DavUIDL_GetParamsGetServerCall,
113 ParseMessageListHeaders_EUID,
115 DavUIDL_RenderView_or_Tail,