fix to match non-numeric timeout; provided by A.Stoeckel

This commit is contained in:
Klaus Leithoff 2010-05-10 08:29:12 +00:00
parent 5e3b6067c7
commit 5075294848

View File

@ -1619,6 +1619,8 @@ class HTTP_WebDAV_Server
if ($http_stat{0} == 2) { // 2xx states are ok
if ($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) {
@ -1626,6 +1628,11 @@ class HTTP_WebDAV_Server
} else {
$timeout = "Second-$options[timeout]";
}
}
else
{
$timeout = $options[timeout];
}
} else {
$timeout = "Infinite";
}