CalDAV/CardDAV: fix not working creation of new contacts in MacOS Addressbook

OSX Addressbook sends ?add-member url-encoded
This commit is contained in:
Ralf Becker 2019-09-12 09:10:03 +02:00
parent 2f1dfcc3d8
commit c5ea1618af

View File

@ -263,11 +263,12 @@ class CalDAV extends HTTP_WebDAV_Server
parent::__construct(); parent::__construct();
// hack to allow to use query parameters in WebDAV, which HTTP_WebDAV_Server interprets as part of the path // hack to allow to use query parameters in WebDAV, which HTTP_WebDAV_Server interprets as part of the path
list($this->_SERVER['REQUEST_URI']) = explode('?',$this->_SERVER['REQUEST_URI']); list($this->_SERVER['REQUEST_URI']) = explode('?',$this->_SERVER['REQUEST_URI']);
/*if (substr($this->_SERVER['REQUEST_URI'],-13) == '/;add-member/') // OSX Addressbook sends ?add-member url-encoded
if (substr($this->_SERVER['REQUEST_URI'], -14) == '/%3Fadd-member')
{ {
$_GET['add-member'] = ''; $_GET['add-member'] = '';
$this->_SERVER['REQUEST_URI'] = substr($this->_SERVER['REQUEST_URI'],0,-12); $this->_SERVER['REQUEST_URI'] = substr($this->_SERVER['REQUEST_URI'], 0, -14);
}*/ }
//error_log($_SERVER['REQUEST_URI']." --> ".$this->_SERVER['REQUEST_URI']); //error_log($_SERVER['REQUEST_URI']." --> ".$this->_SERVER['REQUEST_URI']);
$this->egw_charset = Translation::charset(); $this->egw_charset = Translation::charset();