deal with parsing of query parameters appending an "=" to "?download", accepting "?download=" too

This commit is contained in:
Ralf Becker 2011-09-06 07:23:02 +00:00
parent 7984af4c0e
commit c23450ea73

View File

@ -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();
}