need to use "c" for partial updates, as "r+" requires the file to exits

This commit is contained in:
Ralf Becker 2018-11-24 08:06:14 +08:00
parent a999e6e94f
commit ff7c7326f5

View File

@ -523,8 +523,8 @@ class HTTP_WebDAV_Server_Filesystem extends HTTP_WebDAV_Server
return "403 Forbidden";
}
// for range requests we need to open with "r+" as "w" truncates the file!
$fp = fopen($fspath, empty($options['ranges']) ? "w" : "r+");
// for range requests we need to open with "c" as "w" truncates the file!
$fp = fopen($fspath, empty($options['ranges']) ? "w" : "c");
return $fp;
}