Changeset View
Changeset View
Standalone View
Standalone View
lib/ext/Syncroton/Server.php
Show First 20 Lines • Show All 340 Lines • ▼ Show 20 Lines | protected function _getRequestParameters(Zend_Controller_Request_Http $request) | ||||
$unpacked = unpack('A' . $length . 'string', fread($stream, $length)); | $unpacked = unpack('A' . $length . 'string', fread($stream, $length)); | ||||
$deviceType = $unpacked['string']; | $deviceType = $unpacked['string']; | ||||
} | } | ||||
while (! feof($stream)) { | while (! feof($stream)) { | ||||
$tag = ord(fread($stream, 1)); | $tag = ord(fread($stream, 1)); | ||||
$length = ord(fread($stream, 1)); | $length = ord(fread($stream, 1)); | ||||
// If the stream is at the end we'll get a 0-length | |||||
if (!$length) { | |||||
continue; | |||||
} | |||||
switch ($tag) { | switch ($tag) { | ||||
case self::PARAMETER_ATTACHMENTNAME: | case self::PARAMETER_ATTACHMENTNAME: | ||||
$unpacked = unpack('A' . $length . 'string', fread($stream, $length)); | $unpacked = unpack('A' . $length . 'string', fread($stream, $length)); | ||||
$attachmentName = $unpacked['string']; | $attachmentName = $unpacked['string']; | ||||
break; | break; | ||||
case self::PARAMETER_COLLECTIONID: | case self::PARAMETER_COLLECTIONID: | ||||
▲ Show 20 Lines • Show All 100 Lines • Show Last 20 Lines |