A simple php CalDAV-Client library. Connect, create, change, delete... easy to use
GNU General Public License v2.0
116
stars
60
forks
source link
Exception: Could'n find a CalDAV-collection under the url when connecting to EGroupWare #40
Open
Apps-n-Add-Ons opened 4 years ago
There is a bug (or, rather, an enhancement needed) in CalDAVClient.php
When connecting to EGroupWare, you get the error:
Exception: Could'n find a CalDAV-collection under the url
It is an easy fix.
The problem is that EGW sends header of "Dav:" not "DAV:" as in this code.
Change around line 168 from
$dav_header = preg_grep('/^DAV:/', $headers);
to$dav_header = preg_grep('/^DAV:/i', $headers);
and around line 171 from
$dav_header = preg_replace('/^DAV: /', '', $dav_header);
to $dav_header = preg_replace('/^DAV: /i', '', $dav_header);(allow upper/lower case on the preg_ functions)
After that, you get data from EGW!