Commit 35763ff2 authored by Sebastian Kummer's avatar Sebastian Kummer

Merge pull request #32 in ZP/z-push from...

Merge pull request #32 in ZP/z-push from bugfix/ZP-670-autodiscover-use-http_response_code to develop

* commit 'd4524802':
  ZP-670 Use http_response_code. Released under the Affero GNU General Public License (AGPL) version 3.
parents 98f36d84 d4524802
......@@ -43,6 +43,7 @@
include_once('../lib/core/zpushdefs.php');
include_once('../lib/exceptions/exceptions.php');
include_once('../lib/utils/compat.php');
include_once('../lib/utils/utils.php');
include_once('../lib/core/zpush.php');
include_once('../lib/core/zlog.php');
......@@ -120,7 +121,7 @@ class ZPushAutodiscover {
else {
ZLog::Write(LOGLEVEL_ERROR, sprintf("Unable to complete autodiscover incorrect request: '%s'", $ex->getMessage()));
}
header('HTTP/1.1 401 Unauthorized');
http_response_code(401);
header('WWW-Authenticate: Basic realm="ZPush"');
}
catch (ZPushException $ex) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment