#
# POST an event with attendees
#
TYPE=POST
URL=http://regression.host/.well-known/ischedule

HEADER=X-DAViCal-Flush-Cache: true
HEADER=DAVKit/4.0.3 (732.2); CalendarStore/4.0.4 (997.7); iCal/4.0.4 (1395.7); Mac OS X/10.6.8 (10K549)
HEADER=iSchedule-version: 1.0
HEADER=Originator: mailto:user1@example.net
HEADER=Recipient: mailto:user1@example.net, mailto:user2@example.net, mailto:user3@example.net, mailto:user4@example.net
HEADER=Content-Type: text/calendar; component=VEVENT; method=REQUEST
HEADER=DKIM-Signature: v=1; a=rsa-sha256; s=cal; d=caldav; c=simple-http; q=dns/txt; l=1486; t=1327610315; h=Host:Originator:Recipient:Content-Type:iSchedule-Version; bh=POpauoI0rLZ+cI0vmGXIj4xy43xmE5+CGnXoY3GRuyg=; b=WzlFXjRpv883+NOvPoAOvNok0vKMrHh36ayX60AKjNaHBQ68PAzwcd7ixrf9aZgZh6ossW6TJFh/nrBUx2MufwY6EFJWl1CMufXkoCcjitctIcnDhatRkksSdfzdU4lUElPGVNJL7QrMCsxoyVLwKbux1yGRYGOKetzLzQ9rPiRBQTfJTcrHevE0/NRcG7Iuhcw4xvdUlkwr4I0Xdnj9cLUdKLbgW04BWtkoXSCgMR/eqR2qNHfheIWW/0r2ab34Pzaj0L2hd26BoeukuBLSa77+lefckoewb1E1xlPMfqgGmuINPAbDbJYPAfs5Fz4kOZvfPGz8wUjz3wt2xDFgig==
HEAD


BEGINDATA
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Apple Inc.//iCal 3.0//EN
CALSCALE:GREGORIAN
BEGIN:VTIMEZONE
TZID:Pacific/Auckland
BEGIN:STANDARD
TZOFFSETFROM:+1300
TZOFFSETTO:+1200
DTSTART:19900318T030000
RRULE:FREQ=YEARLY;UNTIL=20070317T140000Z;BYMONTH=3;BYDAY=3SU
TZNAME:NZST
END:STANDARD
BEGIN:DAYLIGHT
TZOFFSETFROM:+1200
TZOFFSETTO:+1300
DTSTART:20070930T020000
RRULE:FREQ=YEARLY;BYMONTH=9;BYDAY=-1SU
TZNAME:NZDT
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+1300
TZOFFSETTO:+1200
DTSTART:20080406T030000
RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU
TZNAME:NZST
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
SEQUENCE:7
DESCRIPTION:Masses of Lunch will be needed
UID:iSchedule-POST-attendees
TRANSP:OPAQUE
DTSTART;TZID=Pacific/Auckland:20111123T110000
DTEND;TZID=Pacific/Auckland:20111123T160000
DTSTAMP:20101124T221900Z
SUMMARY:Multiple Beard Meeting
CREATED:20071124T221521Z
RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=4MO;COUNT=4
ORGANIZER;CN=User 1:MAILTO:user1@example.net
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;
 RSVP=TRUE;CN=User 1;LANGUAGE=en:MAILTO:user1@example.net
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;
 RSVP=TRUE;CN=User 2;LANGUAGE=en:MAILTO:user2@example.net
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;
 RSVP=TRUE;CN=User 3;LANGUAGE=en:MAILTO:user3@example.net
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;
 RSVP=TRUE;CN=User 4;LANGUAGE=en:MAILTO:user4@example.net
END:VEVENT
END:VCALENDAR
ENDDATA


QUERY
SELECT caldav_data.user_no, caldav_data.dav_name,
       caldav_type, logged_user, caldav_data.caldav_data AS "vcalendar",
       summary
FROM caldav_data JOIN calendar_item USING(dav_name) LEFT JOIN timezones ON (tz_id=tzid)
WHERE calendar_item.uid = 'iSchedule-POST-attendees'
ORDER BY caldav_data.dav_id
ENDQUERY

