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.
16 /* SAMPLE QUERIES TO WORK WITH *
18 REPORT /groupdav/calendar/ HTTP/1.1
19 Content-type: application/xml
22 <C:calendar-query xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:D="DAV:">
27 <C:comp-filter name="VCALENDAR">
28 <C:comp-filter name="VEVENT">
29 <C:time-range start="20111129T231445Z" end="20120207T231445Z"/>
36 REPORT /groupdav/calendar/ HTTP/1.1
37 Content-type: application/xml
40 <C:calendar-query xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:D="DAV:">
45 <C:comp-filter name="VCALENDAR">
46 <C:comp-filter name="VEVENT"/>
54 #include "webserver.h"
59 * The pathname is always going to be /groupdav/room_name/msg_num
64 time_t now = time(NULL);
66 http_datestring(datestring, sizeof datestring, now);
67 const char *req = ChrPtr(WC->upload);
69 syslog(LOG_DEBUG, "REPORT: \033[31m%s\033[0m", req);
71 hprintf("HTTP/1.1 500 Internal Server Error\r\n");
73 hprintf("Date: %s\r\n", datestring);
74 hprintf("Content-Type: text/plain\r\n");
75 wc_printf("An internal error has occurred at %s:%d.\r\n", __FILE__ , __LINE__ );
82 extern int ParseMessageListHeaders_EUID(StrBuf *Line,
85 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,