Do not call REPORT free-busy-query on the principal-URL
I setup a CalDAV only account for aaa@aegee.org with secret abc. Then I select “New Meeting”, select the personal calendar and add as attendee bbb@aegee.org . Evolution-calendar-factory calls:
> REPORT /dav/calendars/user/aaa/Default/ HTTP/1.1 > Soup-Debug-Timestamp: 1613924611
> Soup-Debug: EWebDAVSession 1 (0x7f263c05cac0), SoupMessage 5 (0x7f26a001aca0), SoupSocket 5 (0x7f264001c9b0)
> Host: mail.aegee.org:444
> User-Agent: Evolution/3.39.3
> Connection: close
> Cache-Control: no-cache
> Pragma: no-cache
> Depth: 0
> Content-Type: application/xml; charset="utf-8"
> Accept-Encoding: gzip, deflate
> Accept-Language: en-gb, en;q=0.9
> Authorization: Basic [aaa@aegee.org:***]
>
> <principal-property-search xmlns="DAV:" xmlns:c="urn:ietf:params:xml:ns:caldav">
> <apply-to-principal-collection-set/>
> <property-search>
> <prop>
> <c:calendar-user-address-set/>
> </prop>
> <match>bbb@aegee.org</match>
> </property-search>
> <prop>
> <displayname/>
> </prop>
> </principal-property-search>
< HTTP/1.1 207 Multi-Status
< Soup-Debug-Timestamp: 1613924611
< Soup-Debug: SoupMessage 5 (0x7f26a001aca0)
< Date: Sun, 21 Feb 2021 16:23:31 GMT
< Content-Type: application/xml; charset=utf-8
< Content-Length: 278
< Connection: close
< Vary: Accept-Encoding, Brief, Prefer
<
<?xml version="1.0" encoding="utf-8"?>
<multistatus xmlns="DAV:" xmlns:c="urn:ietf:params:xml:ns:caldav">
<response>
<href>/dav/principals/user/bbb/</href>
<propstat>
<prop><displayname>Sandra</displayname></prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
</multistatus>
> REPORT /dav/principals/user/bbb/ HTTP/1.1
> Soup-Debug-Timestamp: 1613924611
> Soup-Debug: EWebDAVSession 1 (0x7f263c05cac0), SoupMessage 6 (0x7f26a001ad90), SoupSocket 6 (0x7f264001ca80)
> Host: mail.aegee.org:444
> User-Agent: Evolution/3.39.3
> Connection: close
> Cache-Control: no-cache
> Pragma: no-cache
> Depth: infinity
> Content-Type: application/xml; charset="utf-8"
> Accept-Encoding: gzip, deflate
> Accept-Language: en-gb, en;q=0.9
> Authorization: Basic [aaa@aegee.org:***]
>
> <free-busy-query xmlns="urn:ietf:params:xml:ns:caldav">
> <time-range start="20210213T220000Z" end="20210320T220000Z"/>
> </free-busy-query>
< HTTP/1.1 403 Forbidden
< Soup-Debug-Timestamp: 1613924611
< Soup-Debug: SoupMessage 6 (0x7f26a001ad90)
< Date: Sun, 21 Feb 2021 16:23:31 GMT
< Content-Type: application/xml; charset=utf-8
< Content-Length: 180
< Connection: close
< Vary: Accept-Encoding
<
<?xml version="1.0" encoding="utf-8"?>
<D:error xmlns:D="DAV:">
<D:supported-report/>
<D:responsedescription>This REPORT type is not supported here</D:responsedescription>
</D:error>
- When evoluton anyway gets the DAV:displayname of a principal, there shall be means to expose the DAV:displayname to the UI.
I have implemented REPORT principal-property-search with apply-to-principal-collection-set yesterday in the way I understand it.
The value of the DAV:principal-collection-set properdy is /dav/principals/user . My understanding is that whenever apply-to-principal-collection-set is set the Request-URL shall be overwritten, as if the request was submitted towards the URLs from DAV:principal-collection-set. In turn the first REPORT returns as href the principal-URL for the searched user in the href.
The second REPORT calls REPORT free-busy-query on the principal-URL. This report is defined on calendar collections (and home-sets), not on the principal-URL.
In fact, I am looking for a way how to utilize the code in eds/src/calendar/backends/caldav/e-cal-backend-caldav.c and to get first the schedule-outbox-URL and post there
curl -ubbb:abc -H'content-type:text/calendar; charset=utf-8;method=request' --data-binary @- << EOF https://mail.aegee.org:444/dav/calendars/user/bbb/Outbox
BEGIN:VCALENDAR
VERSION:2.0
METHOD:REQUEST
PRODID:-//Example Corp.//CalDAV Client//EN
BEGIN:VFREEBUSY
UID:123
DTSTART:20210202T000000Z
DTSTAMP:20210216T000000Z
DTEND:20210304T000000Z
ORGANIZER:mailto:bbb@aegee.org
ATTENDEE:mailto:aaa@aegee.org
END:VFREEBUSY
END:VCALENDAR
EOF
(which currently does not function server-side).
- Do not call REPORT free-busy-query on the principal-URL, but on the calendar-home-set(s). Calling it on the calendar-home-sets is server-side not very efficient, since the user can see many shared home-sets, which are all transparent (occupy no time) but still must be iterated by the CUA.
- How can I trigger over the UI a call to ecb_caldav_get_free_busy_from_schedule_outbox_sync() ?