Commit 2aca0e29 authored by Sebastian Kummer's avatar Sebastian Kummer

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

Merge pull request #549 in ZP/z-push from feature/ZP-1243-always-send-x-push-capabilities-header to develop

* commit '1099c486':
  ZP-1243 Always send X-Push-Capabilities header in Settings responses, always log special headers in DEBUG.
parents 54cb4db0 1099c486
......@@ -107,8 +107,10 @@ include_once(ZPUSH_CONFIG);
RequestProcessor::HandleRequest();
// eventually the RequestProcessor wants to send other headers to the mobile
foreach (RequestProcessor::GetSpecialHeaders() as $header)
foreach (RequestProcessor::GetSpecialHeaders() as $header) {
ZLog::Write(LOGLEVEL_DEBUG, sprintf("Special header: %s", $header));
header($header);
}
// stream the data
$len = ob_get_length();
......
......@@ -37,9 +37,7 @@ class Settings extends RequestProcessor {
if (!self::$decoder->getElementStartTag(SYNC_SETTINGS_SETTINGS))
return false;
// add capability header for KOE
if(self::$deviceManager->IsKoe()) {
// define the supported capabilites
// always add capability header - define the supported capabilites
$cap = array();
if (defined('KOE_CAPABILITY_GAB') && KOE_CAPABILITY_GAB) $cap[] = "gab";
if (defined('KOE_CAPABILITY_RECEIVEFLAGS') && KOE_CAPABILITY_RECEIVEFLAGS) $cap[] = "receiveflags";
......@@ -54,7 +52,9 @@ class Settings extends RequestProcessor {
if (defined('KOE_CAPABILITY_RECEIPTS') && KOE_CAPABILITY_RECEIPTS) $cap[] = "receipts";
self::$specialHeaders = array();
self::$specialHeaders[] = "X-Push-Capabilities: ". implode(",",$cap);
self::$specialHeaders[] = "X-Push-Capabilities: ". implode(",", $cap);
if(self::$deviceManager->IsKoe()) {
self::$specialHeaders[] = "X-Push-GAB-Name: ". bin2hex(KOE_GAB_NAME);
if (defined('KOE_CAPABILITY_SIGNATURES') && KOE_CAPABILITY_SIGNATURES) {
......
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