support for Prefer: return-minimal in PROPFIND requests, as described in draft-snell-http-prefer

This commit is contained in:
Ralf Becker 2012-10-16 11:47:55 +00:00
parent bd512f8195
commit 81950eb246

View File

@ -858,8 +858,9 @@ class HTTP_WebDAV_Server
= $this->mkprop("DAV:",
"lockdiscovery",
$this->lockdiscovery($file['path']));
// only collect $file['noprops'] if we have NO Brief: t HTTP Header
} elseif (!isset($this->_SERVER['HTTP_BRIEF']) || $this->_SERVER['HTTP_BRIEF'] != 't') {
// only collect $file['noprops'] if we have NO Brief: t and NO Prefer: return-minimal HTTP Header
} elseif ((!isset($this->_SERVER['HTTP_BRIEF']) || $this->_SERVER['HTTP_BRIEF'] != 't') &&
(!isset($this->_SERVER['HTTP_PREFER']) || $this->_SERVER['HTTP_PREFER'] != 'return-minimal')) {
// add empty value for this property
$file["noprops"][] =
$this->mkprop($reqprop["xmlns"], $reqprop["name"], "");