diff --git a/sources/cli/kalcli.php b/sources/cli/kalcli.php index 2033522dd..9db5b7598 100644 --- a/sources/cli/kalcli.php +++ b/sources/cli/kalcli.php @@ -347,7 +347,7 @@ function printLogFiltered($logPortion, $sessionId) $logPortion = file_get_contents(API_LOG_FILENAME, false, null, $initialLogSize, $currentLogSize - $initialLogSize); - if (preg_match('/X-Kaltura-Session: (\d+)/', $curlWrapper->responseHeaders, $matches)) + if (preg_match('/x-kaltura-session: (\d+)/', strtolower($curlWrapper->responseHeaders), $matches)) { $sessionId = $matches[1]; printLogFiltered($logPortion, $sessionId); diff --git a/sources/php5/KalturaClientBase.php b/sources/php5/KalturaClientBase.php index 2da64c5b3..c16a682bd 100644 --- a/sources/php5/KalturaClientBase.php +++ b/sources/php5/KalturaClientBase.php @@ -369,9 +369,9 @@ public function doQueue() foreach ($this->responseHeaders as $curHeader) { $splittedHeader = explode(':', $curHeader, 2); - if ($splittedHeader[0] == 'X-Me') + if (strtolower($splittedHeader[0]) == 'x-me') $serverName = trim($splittedHeader[1]); - else if ($splittedHeader[0] == 'X-Kaltura-Session') + else if (strtolower($splittedHeader[0]) == 'x-kaltura-session') $serverSession = trim($splittedHeader[1]); } if (!is_null($serverName) || !is_null($serverSession)) diff --git a/sources/php53/library/Kaltura/Client/Base.php b/sources/php53/library/Kaltura/Client/Base.php index 843a5cb55..1fbfceb05 100644 --- a/sources/php53/library/Kaltura/Client/Base.php +++ b/sources/php53/library/Kaltura/Client/Base.php @@ -232,9 +232,9 @@ public function doQueue() foreach ($this->responseHeaders as $curHeader) { $splittedHeader = explode(':', $curHeader, 2); - if ($splittedHeader[0] == 'X-Me') + if (strtolower($splittedHeader[0]) == 'x-me') $serverName = trim($splittedHeader[1]); - else if ($splittedHeader[0] == 'X-Kaltura-Session') + else if (strtolower($splittedHeader[0]) == 'x-kaltura-session') $serverSession = trim($splittedHeader[1]); } if (!is_null($serverName) || !is_null($serverSession)) diff --git a/sources/zend/Kaltura/Client/ClientBase.php b/sources/zend/Kaltura/Client/ClientBase.php index 02d0b7d1a..007d790af 100644 --- a/sources/zend/Kaltura/Client/ClientBase.php +++ b/sources/zend/Kaltura/Client/ClientBase.php @@ -256,9 +256,9 @@ public function doQueue() foreach ($this->responseHeaders as $curHeader) { $splittedHeader = explode(':', $curHeader, 2); - if ($splittedHeader[0] == 'X-Me') + if (strtolower($splittedHeader[0]) == 'x-me') $serverName = trim($splittedHeader[1]); - else if ($splittedHeader[0] == 'X-Kaltura-Session') + else if (strtolower($splittedHeader[0]) == 'x-kaltura-session') $serverSession = trim($splittedHeader[1]); } if (!is_null($serverName) || !is_null($serverSession))