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

This commit is contained in:
Ralf Becker 2012-10-24 07:12:20 +00:00
parent 8d88867642
commit dd6004ca7b

View File

@ -825,8 +825,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"], "");