diff --git a/inc/CalDAVRequest.php b/inc/CalDAVRequest.php index bf7fcbe3..cc66b87e 100644 --- a/inc/CalDAVRequest.php +++ b/inc/CalDAVRequest.php @@ -42,6 +42,18 @@ class CalDAVRequest if ( $this->depth == 'infinity' ) $this->depth = 99; $this->depth = intval($this->depth); + /** + * MOVE/COPY use a "Destination" header and (optionally) an "Overwrite" one. + */ + if ( isset($_SERVER['HTTP_DESTINATION']) ) $this->destination = $_SERVER['HTTP_DESTINATION']; + $this->overwrite = ( isset($_SERVER['HTTP_OVERWRITE']) ? $_SERVER['HTTP_OVERWRITE'] : 'T' ); // RFC2518, 9.6 says default True. + + /** + * LOCK things use an "If" header to hold the lock in some cases, and "Lock-token" in others + */ + if ( isset($_SERVER['HTTP_IF']) ) $this->if_clause = $_SERVER['HTTP_IF']; + if ( isset($_SERVER['HTTP_LOCK-TOKEN']) ) $this->lock_token = $_SERVER['HTTP_LOCK-TOKEN']; + /** * Our path is /