From 60ffd152aaaf6f59946e4f5eafdd440cc7c3c5cf Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Sun, 8 Oct 2006 00:30:01 +1300 Subject: [PATCH] Removal of warnings, adding of permissions. --- htdocs/caldav.php | 68 ++++++++++++++++++- inc/caldav-GET.php | 4 +- inc/caldav-PROPFIND.php | 145 ++++++++++++++-------------------------- inc/caldav-PUT.php | 72 ++++++++++---------- inc/caldav-REPORT.php | 40 +++-------- 5 files changed, 165 insertions(+), 164 deletions(-) diff --git a/htdocs/caldav.php b/htdocs/caldav.php index b0b00770..04697742 100644 --- a/htdocs/caldav.php +++ b/htdocs/caldav.php @@ -6,10 +6,76 @@ require_once("BasicAuthSession.php"); $raw_headers = apache_request_headers(); $raw_post = file_get_contents ( 'php://input'); -if ( $debugging && isset($_GET['method']) ) { +if ( isset($debugging) && isset($_GET['method']) ) { $_SERVER['REQUEST_METHOD'] = $_GET['method']; } +/** +* A variety of requests may set the "Depth" header to control recursion +*/ +$query_depth = ( isset($_SERVER['HTTP_DEPTH']) ? $_SERVER['HTTP_DEPTH'] : 0 ); +if ( $query_depth == 'infinite' ) $query_depth = 99; +$query_depth = intval($query_depth); + +/** +* Our path is /