From 53375960599a7ffe0fc71dc302a49bf43f6add60 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Mon, 10 May 2010 08:28:35 +0000 Subject: [PATCH] fix to match non-numeric timeout; provided by A.Stoeckel --- egw-pear/HTTP/WebDAV/Server.php | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/egw-pear/HTTP/WebDAV/Server.php b/egw-pear/HTTP/WebDAV/Server.php index e5a9fe20ab..bc1789ea27 100644 --- a/egw-pear/HTTP/WebDAV/Server.php +++ b/egw-pear/HTTP/WebDAV/Server.php @@ -1621,13 +1621,20 @@ class HTTP_WebDAV_Server if ($http_stat{0} == 2) { // 2xx states are ok if ($options["timeout"]) { - // more than a million is considered an absolute timestamp - // less is more likely a relative value - if ($options["timeout"]>1000000) { - $timeout = "Second-".($options['timeout']-time()); - } else { - $timeout = "Second-$options[timeout]"; - } + if (is_numeric($options["timeout"])) + { + // more than a million is considered an absolute timestamp + // less is more likely a relative value + if ($options["timeout"]>1000000) { + $timeout = "Second-".($options['timeout']-time()); + } else { + $timeout = "Second-$options[timeout]"; + } + } + else + { + $timeout = $options[timeout]; + } } else { $timeout = "Infinite"; }