bugzilla.mozilla.org will be intermittently unavailable on Saturday, March 24th, from 16:00 until 20:00 UTC.

Implement calIFreeBusyProvider for CalDav Provider



Provider: CalDAV
11 years ago
10 years ago


(Reporter: Hubert FONGARNAND, Assigned: Bruno Browning)


(Blocks: 1 bug)




(2 attachments)



11 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv: Gecko/20070914 Firefox/
Build Identifier: 

There's a way to retrieve free busy information from caldav server 
Refer to RFC 4791  
     7.10. CALDAV:free-busy-query REPORT  . . . . . . . . . . . . . . 66
       7.10.1. Example: Successful CALDAV:free-busy-query REPORT  . . 68

It would be very great to have this nice feature in lightning...

I use an hack made be "inverse lightning enhancer" to provide FB information in ICS format... 

Reproducible: Always

Steps to Reproduce:
1.Open a caldav calendar
2.Add an attendee
3.The FreeBusy information is never displayer

Expected Results:  
It should works (with the caldav protocol)

Example of caldav freebusy request

>> Request <<

   REPORT /bernard/work/ HTTP/1.1
   Host: cal.example.com
   Depth: 1
   Content-Type: application/xml; charset="utf-8"
   Content-Length: xxxx

   <?xml version="1.0" encoding="utf-8" ?>
   <C:free-busy-query xmlns:C="urn:ietf:params:xml:ns:caldav">
     <C:time-range start="20060104T140000Z"

   >> Response <<

   HTTP/1.1 200 OK
   Date: Sat, 11 Nov 2006 09:32:12 GMT
   Content-Type: text/calendar
   Content-Length: xxxx

   PRODID:-//Example Corp.//CalDAV Server//EN

Comment 1

11 years ago
I'd like to stick to (draft) CalDAV scheduling which is AFAIK the recommended way to get free-busy information of a specific user, e.g. <http://tools.ietf.org/html/draft-desruisseaux-caldav-sched-03#section-6.1.7>. This allows to incorporate multiple calendars of a user.
Ever confirmed: true

Comment 2

11 years ago
no problem...


11 years ago
Blocks: 400694

Comment 3

11 years ago
Is there any schedule for implementation of the CalDAV scheduling? The Cosmo developers are currently designing the scheduling implementation and they will probably come up with something in the next few months. It would be really great if Lightning support was moving along with the developments. I think the Darwin server already has some kind of CalDAV scheduling support if i am not mistaken.

Comment 4

11 years ago
No schedule, but progress is being made and the beginnings of scheduling support (initially in the form of a patch for this bug) should appear soon.


11 years ago
Assignee: nobody → browning

Comment 5

11 years ago
Created attachment 289981 [details] [diff] [review]
patch version 1 [checked in]

Patch adds various kinds of discovery needed for CalDAV-scheduling as well as implementing getFreeBusyIntervals(). Currently only working with the Apple server, and that with a long (~15sec) delay at program startup. The discovery parts will doubtless want to change as servers (and the standard) mature - but this gets us a basis on which to begin implementing the rest of the draft scheduling standard.
Attachment #289981 - Flags: review?(daniel.boelzle)

Comment 6

11 years ago
Hi Bruno,

+    // implementations. So provisionally we assume the 99% case, where the
+    // calendar's principal-URL is the immediate parent of the calendar itself

It would be good if this was a fallback for when you couldn't retrieve the principal-URL through a PROPFIND.

Comment 7

11 years ago
Comment on attachment 289981 [details] [diff] [review]
patch version 1 [checked in]

r=dbo; thanks for the patch!

Checked in on HEAD and MOZILLA_1_8_BRANCH.
Attachment #289981 - Flags: review?(daniel.boelzle) → review+
OS: Linux → All
Hardware: PC → All
Target Milestone: --- → 0.8

Comment 8

10 years ago
Created attachment 291014 [details] [diff] [review]
follow-on patch with improvements

Since this bug is still open, I'll post a follow-on patch here instead of in a different bug. This patch (which assumes the first is already in-tree):
* uses clearer naming wrt calendar-home-set
* makes more efficient queries
* checks to prevent accepting data about a different user (e.g. queries about user2 ignore data about user22)
* does not assume that all responses have <?xml ... headers
Attachment #291014 - Flags: review?(daniel.boelzle)

Comment 9

10 years ago
Comment on attachment 291014 [details] [diff] [review]
follow-on patch with improvements

Attachment #291014 - Flags: review?(daniel.boelzle) → review+
Attachment #289981 - Attachment description: patch version 1 → patch version 1 [checked in]

Comment 10

10 years ago
I would like to know how lightning knows where to look at, to search freebusy information from an attendee.
Or how an attendee is linked to a cal provider (Google, Caldav, WCAP)
Have you a link or spec, forum's thread that explain this ?

Comment 12

10 years ago
(In reply to comment #10)
> Hi, 
> I would like to know how lightning knows where to look at, to search freebusy
> information from an attendee.
> Or how an attendee is linked to a cal provider (Google, Caldav, WCAP)
> Have you a link or spec, forum's thread that explain this ?
> Cheers

Please see:

which is where it is defined. 

Comment 13

10 years ago
Please commit the second patch as it corrects many issue i have...

Comment 14

10 years ago
patch #2 checked in on MOZILLA_1_8_BRANCH and trunk.

Closing this bug before I spam it again.

Last Resolved: 10 years ago
Resolution: --- → FIXED

Comment 15

10 years ago
Does this in fact still only work with the Apple Calendar Server or is it simply untested with others? I would be interested in using free-busy with the Chandler Server, but i am not even entirely sure to what degree Cosmo supports free-busy (last state for free-busy in Cosmo i heard of is "experimental" and little tested) .

Comment 16

10 years ago
I haven't tested it with Chandler yet. I have tested it with a couple of other CalDAV servers, where it fails in different ways for what look to me to be server-side issues; I'll be following in up on that with the respective server groups. I wasn't aware that Chandler had any part of CalDAV-scheduling implemented yet; please do mail me about what you find in that regard.

Comment 17

10 years ago
Cosmo does not yet implement CalDAV scheduling, so this free-busy feature won't work with Cosmo (for now).
You need to log in before you can comment on or make changes to this bug.