From e54f9ee079b5ee9585bb284e9083a65d50b9d988 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 21 Oct 2008 11:57:26 +0000 Subject: [PATCH] Fixed encoding problems in WebDAV and vfs: - egw_vfs::download_url as not encoding + or ' ' in pathes - HTTP_WebDAV_Server was urldecoding $_SERVER[PATH_INFO], which is wrong, as it is NOT encoded - HTTP_WebDAV_Server was NOT urlencoding the pathes in PROPFIND responses, causing eg. cadaver not to be able to use dirs containing + or space --- etemplate/inc/class.vfs_widget.inc.php | 2 +- phpgwapi/inc/class.egw_vfs.inc.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/etemplate/inc/class.vfs_widget.inc.php b/etemplate/inc/class.vfs_widget.inc.php index 8639f9d2a4..a006cce1ce 100644 --- a/etemplate/inc/class.vfs_widget.inc.php +++ b/etemplate/inc/class.vfs_widget.inc.php @@ -137,7 +137,7 @@ class vfs_widget { if ($n < count($comps)-1 || $mime == egw_vfs::DIR_MIME_TYPE) { - $value['l'.$n] = '/index.php?menuaction=filemanager.filemanager_ui.index&path='.$path; + $value['l'.$n] = '/index.php?menuaction=filemanager.filemanager_ui.index&path='.urlencode($path); $target = ''; } else diff --git a/phpgwapi/inc/class.egw_vfs.inc.php b/phpgwapi/inc/class.egw_vfs.inc.php index dbb5b0753d..5e27d8b459 100644 --- a/phpgwapi/inc/class.egw_vfs.inc.php +++ b/phpgwapi/inc/class.egw_vfs.inc.php @@ -992,7 +992,7 @@ class egw_vfs extends vfs_stream_wrapper { $path = parse_url($path,PHP_URL_PATH); } - return '/webdav.php'.$path; + return '/webdav.php'.strtr($path,array('%' => '%25','+' => '%2B',' ' => '%20')); } /**