From 0dc7e880002415daa256bf87dab076a7330858c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Lehrke?= Date: Tue, 16 Mar 2010 11:54:38 +0000 Subject: [PATCH] Fix error message issue --- egw-pear/HTTP/WebDAV/Server.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/egw-pear/HTTP/WebDAV/Server.php b/egw-pear/HTTP/WebDAV/Server.php index c5beebe4ac..69042639d8 100644 --- a/egw-pear/HTTP/WebDAV/Server.php +++ b/egw-pear/HTTP/WebDAV/Server.php @@ -635,7 +635,7 @@ class HTTP_WebDAV_Server { $this->http_status('207 Multi-Status'); } - else + elseif (is_string($retval)) { $this->http_status($retval); header('Content-Type: text/html'); @@ -1328,7 +1328,16 @@ class HTTP_WebDAV_Server if ($this->_check_lock_status($this->path)) { $options = Array(); $options["path"] = $this->path; - $options["content_length"] = $this->_SERVER["CONTENT_LENGTH"]; + + if (isset($this->_SERVER['CONTENT_LENGTH'])) + { + $options['content_length'] = $this->_SERVER['CONTENT_LENGTH']; + } + elseif (isset($this->_SERVER['X-Expected-Entity-Length'])) + { + // MacOS gives us that hint + $options['content_length'] = $this->_SERVER['X-Expected-Entity-Length']; + } // get the Content-type if (isset($this->_SERVER["CONTENT_TYPE"])) {