/** * This method handles the PROPFIND method. * * It's a very lazy method, it won't bother checking the request body * for which properties were requested, and just sends back a default * set of properties. * * @param string $tempLocation * @param string $uri * @return bool */ public function httpPropfind($tempLocation, $uri) { if (!file_exists($tempLocation)) { return true; } $hR = $this->server->httpResponse; $hR->setHeader('X-Sabre-Temp', 'true'); $hR->sendStatus(207); $hR->setHeader('Content-Type', 'application/xml; charset=utf-8'); $this->server->parsePropFindRequest($this->server->httpRequest->getBody(true)); $properties = array('href' => $uri, 200 => array('{DAV:}getlastmodified' => new Sabre_DAV_Property_GetLastModified(filemtime($tempLocation)), '{DAV:}getcontentlength' => filesize($tempLocation), '{DAV:}resourcetype' => new Sabre_DAV_Property_ResourceType(null), '{' . Sabre_DAV_Server::NS_SABREDAV . '}tempFile' => true)); $data = $this->server->generateMultiStatus(array($properties)); $hR->sendBody($data); return false; }