diff --git a/htdocs/caldav.php b/htdocs/caldav.php index 2083fb6f..8b0d9334 100644 --- a/htdocs/caldav.php +++ b/htdocs/caldav.php @@ -19,11 +19,16 @@ if ( isset($_SERVER['PATH_INFO']) && preg_match( '{^(/favicon.ico|davical.css|(i } exit(0); } -elseif ( isset($_SERVER['PATH_INFO']) && preg_match( '{^/\.well-known/(.+)$}', $_SERVER['PATH_INFO'], $matches ) ) { - require ('well-known.php'); +require_once('./always.php'); + +if ( isset($_SERVER['PATH_INFO']) && preg_match( '{^/\.well-known/(.+)$}', $_SERVER['PATH_INFO'], $matches ) ) { + require ('well-known.php'); + exit(0); +} +elseif ( isset($_SERVER['PATH_INFO']) && $_SERVER['PATH_INFO'] == '/autodiscover/autodiscover.xml' ) { + require ('autodiscover-handler.php'); exit(0); } -require_once('./always.php'); function logRequestHeaders() { global $c; diff --git a/inc/autodiscover-handler.php b/inc/autodiscover-handler.php new file mode 100644 index 00000000..9eda2e6c --- /dev/null +++ b/inc/autodiscover-handler.php @@ -0,0 +1,2 @@ +