Summary | activesync wbxml content begint with two 0x0a |
Queue | Synchronization |
Queue Version | Git master |
Type | Bug |
State | Not A Bug |
Priority | 1. Low |
Owners | |
Requester | l.kiraly (at) madalbal (dot) hu |
Created | 06/20/2013 (4397 days ago) |
Due | |
Updated | 06/21/2013 (4396 days ago) |
Assigned | 06/20/2013 (4397 days ago) |
Resolved | 06/21/2013 (4396 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
(ending php tag)
<?php
require_once('lib/Application.php');
$conf['cookie']['path'] = '/Microsoft-Server-ActiveSync';
$serverType = 'ActiveSync';
$nocompress = true;
$session_control = 'none';
$cache_control = 'private';
Horde_Registry::appInit('horde', array(
'authentication' => 'none',
'nocompress' => $nocompress,
'session_control' => $session_control,
'session_cache_limiter' => $cache_control
));
header('Content-Length: 451');
header('Content-Type: application/vnd.ms-sync.wbxml');
echo file_get_contents('/tmp/ob_data.txt');
?>
-------------------------
Now I can reproduce this bug in my system. If I uncomment the
Horde_Registry::appInit stuff, the wbxml content is good. If I use
Horde_Registry::appInit then I get ONE extra linefeed in the beginning
of the wbxml content.
New Attachment: test.pcapng
header('Content-Type: application/vnd.ms-sync.wbxml');
print(chr(0x03));
in the tcpdump file there is no linefeed char at the beginning of the
wbxml content, but if I put a return; after a
$this->_encoder->StartWBXML(); in the FolderSync.php I get the extra
linefeeds.
I suspect the key is in the http header fields.
some line feeds to the beginning of the file (before the opening
<?php tag) did you?
some line feeds to the beginning of the file (before the opening <?php
tag) did you?
Horde_ActiveSync library, but some other part of the webserver
response. The only difference what you did makes is that your
temporary file will contain *only* what is sent from the code in
Horde_ActiveSync, while your tcpdump contains *everything* that is
sent as part of the http response.
framework/Core/lib/Horde/Core/Factory/ActiveSyncServer.php file.
I changed the 13. line from new
Horde_ActiveSync_Wbxml_Encoder(fopen('php://output', 'w+')) to
new Horde_ActiveSync_Wbxml_Encoder(fopen('/tmp/xbxml.txt', 'w+')) and
checked the file. It doesn't have the two 0x0a in the beginning. I
assume this is because of the "php://output" fopen option. Maybe some
php.ini setting?
syslog to http://proxy.madalbal.hu/syslog.txt
State ⇒ Feedback
This is normal.
your horde.log contains the following error, so I'm not really sure
where the activesync logs you gave me were from since according to
this, your server was unable to create them.:
Jun 17 11:15:46 test HORDE: [horde] PHP ERROR:
fopen(/tmp/activesync.log/androidc1096662271.txt): failed to open
stream: Nincs ilyen fájl vagy könyvtár [pid 6938 on line 41 of
"/usr/local/src/horde/framework/Core/lib/Horde/Core/ActiveSync/Logger/Factory.php"]
Jun 17 11:15:46 test HORDE: 1. Horde_Rpc_ActiveSync->getResponse()
/usr/local/src/horde/horde/rpc.php:156 2.
Horde_ActiveSync->handleRequest()
/usr/local/src/horde/framework/Rpc/lib/Horde/Rpc/ActiveSync.php:141 3.
Horde_ActiveSync->_setLogger()
/usr/local/src/horde/framework/ActiveSync/lib/Horde/ActiveSync.php:549
4. Horde_Core_ActiveSync_Logger_Factory->create()
/usr/local/src/horde/framework/ActiveSync/lib/Horde/ActiveSync.php:498
5. fopen()
/usr/local/src/horde/framework/Core/lib/Horde/Core/ActiveSync/Logger/Factory.php:41 6.
Horde_ErrorHandler::errorHandler()
This is normal.
Priority ⇒ 1. Low
State ⇒ Not A Bug
This is normal.
Priority ⇒ 3. High
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Summary ⇒ activesync wbxml content begint with two 0x0a
Type ⇒ Bug
Queue ⇒ Synchronization
ActiveSync logs: http://proxy.madalbal.hu/activesync.tar.bz2
You can see that after a Cmd=FolderSync request, the rpc.php sends WBXML
content starting with two hexa 0x0a. It should be the version number
of the actual
WBXML but it's two newline char. After that begins the real WBXML content.