Open ghost opened 7 years ago
And one more thing regarding find_events() and OwnCloud 9.x - the event parsing is also not working as expected and needs to be patched.
In client.rb, line 87 the CalDav events are being extracted as plain text
REXML::XPath.each( xml, '//c:calendar-data/', {"c"=>"urn:ietf:params:xml:ns:caldav"} ){|c| result << c.text }
The next line
r = Icalendar.parse(result)
fails to parse the text stored in "result", because a line-break is missing after "END:VCALENDAR".
So it's necessary to manually add a line-break and then it works again:
client.rb, line 87:
REXML::XPath.each( xml, '//c:calendar-data/', {"c"=>"urn:ietf:params:xml:ns:caldav"} ){|c| result << "#{c.text}\n" }
Hope this helps.
I've updated to OwnCloud 9.1.4 and faced problems when trying to fetch CalDAV events via the find_events() method. The OwnCloud-Server sends a 400 (Bad Request) response with the following body:
I fixed this by adding the necessary "Depth" HTTP request header in
lib/twisted-caldav/client.rb, line 67:
Maybe you could add this extra header to your code as well - maybe this helps others who run into this problem.