diff --git a/src/core/init/responder.php b/src/core/init/responder.php index 41d7030..bc3558d 100644 --- a/src/core/init/responder.php +++ b/src/core/init/responder.php @@ -44,6 +44,9 @@ class Responder { case "Autodiscover/Autodiscover.xml": $resp = $this->ms_autodiscover(); break; + case "/autodiscover/autodiscover.json": //?Email=psw%40wilde.cloud&Protocol=Autodiscoverv1&RedirectCount=1" + $resp = $this->ms_autodiscover_json(); + break; case "none": case "test": case "home": @@ -80,6 +83,12 @@ class Responder { $response->content = "public/autodiscover.php"; return $response; } + private function ms_autodiscover_json(){ + $response = new Response(); + $response->content_type = "xml"; + $response->content = "public/autodiscover.php"; + return $response; + } private function dummy_response(){ // Generate a dummy response for testing $response = new Response(); diff --git a/src/public/autodiscover.php b/src/public/autodiscover.php index 9017f0f..c3aa200 100644 --- a/src/public/autodiscover.php +++ b/src/public/autodiscover.php @@ -4,7 +4,8 @@ $conf = Core::$Config["Services"]; $data = file_get_contents("php://input"); file_put_contents(Core::root_dir()."/xmltest", $data); preg_match("/\(.*?)\<\/EMailAddress\>/", $data, $matches); -echo ''; ?> +//print_r($matches); +//echo ''; ?> diff --git a/src/xmltest b/src/xmltest new file mode 100755 index 0000000..1af7510 --- /dev/null +++ b/src/xmltest @@ -0,0 +1 @@ +psw@wilde.cloud \ No newline at end of file