* NetDrive: enable old workarounds for current user-agent string, create 0 byte files when storing without

This commit is contained in:
Ralf Becker 2015-08-04 14:43:18 +00:00
parent 183efe1f0d
commit 70722cbc45

View File

@ -2692,10 +2692,13 @@ class HTTP_WebDAV_Server
*/
function _urlencode($url)
{
// cadaver (and probably all neon using agents) need a more complete url encoding
// otherwise special chars like "$,()'" in filenames do NOT work
// netdrive does NOT use a User-Agent, but requires full urlencoding for non-ascii chars (eg. German Umlauts)
if (strpos($_SERVER['HTTP_USER_AGENT'],'neon') !== false || !isset($_SERVER['HTTP_USER_AGENT']))
// cadaver (and probably all neon using agents) need a more complete url encoding
// otherwise special chars like "$,()'" in filenames do NOT work
if (strpos($_SERVER['HTTP_USER_AGENT'],'neon') !== false ||
// old netdrive does NOT use a User-Agent, but requires full urlencoding for non-ascii chars (eg. German Umlauts)
!isset($_SERVER['HTTP_USER_AGENT']) ||
// current netdrive uses "NetDrive 2.5.8" as user-agent
stripos($_SERVER['HTTP_USER_AGENT'],'NetDrive') !== false)
{
return strtr(rawurlencode($url),array(
'%2F' => '/',