From c23450ea73fdb2f0dedb153c5deb02ea8b9689aa Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 6 Sep 2011 07:23:02 +0000 Subject: [PATCH] deal with parsing of query parameters appending an "=" to "?download", accepting "?download=" too --- phpgwapi/inc/class.vfs_webdav_server.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpgwapi/inc/class.vfs_webdav_server.inc.php b/phpgwapi/inc/class.vfs_webdav_server.inc.php index 568bd3a946..c96ecb6947 100644 --- a/phpgwapi/inc/class.vfs_webdav_server.inc.php +++ b/phpgwapi/inc/class.vfs_webdav_server.inc.php @@ -540,9 +540,9 @@ class vfs_webdav_server extends HTTP_WebDAV_Server_Filesystem */ function __construct() { - if ($_SERVER['REQUEST_METHOD'] == 'GET' && ($this->force_download = substr($_SERVER['REQUEST_URI'],-9) == '?download')) + if ($_SERVER['REQUEST_METHOD'] == 'GET' && ($this->force_download = strpos($_SERVER['REQUEST_URI'],'?download'))) { - $_SERVER['REQUEST_URI'] = substr($_SERVER['REQUEST_URI'],0,-9); + $_SERVER['REQUEST_URI'] = substr($_SERVER['REQUEST_URI'],0,$this->force_download); } parent::HTTP_WebDAV_Server(); }