Possibly got to the bottom of it ...
Nokia Phone requesting the attachment - issues a GetAttachment request - which uses backend function GetAttachmentData - which returns a stream - which is then handled by the GetAttachment handler code
- Code: Select all
... [DEBUG] -------- Start
... [ INFO] Version='SVN trunk/src r1386' method='POST' from='192.168.200.20' cmd='GetAttachment' getUser='myUser' devId='NOKIA0000002423981' devType='IMEI'
... [DEBUG] Used timezone 'Europe/Dublin'
... [DEBUG] Including backend file: '/var/www/html/trunk/src/backend/zimbra/zimbra.php'
... [DEBUG] Request::ProcessHeaders() ASVersion: 12.1
... [DEBUG] ZPush::CommandNeedsProvisioning(4): true
... [DEBUG] FileStateMachine->GetState() on file: '/var/lib/z-push/1/8/NOKIA0000002423981-devicedata'
... [DEBUG] ASDevice data loaded for user: 'myUser'
... [DEBUG] TopCollector(): Initialized mutexid Resource id #110 and memid 111.
... [DEBUG] LoopDetection(): Initialized mutexid Resource id #113 and memid 114.
... [DEBUG] ZPush::HierarchyCommand(4): false
... [DEBUG] DeviceManager->ProvisioningRequired('255780135') saved device key '255780135': false
... [DEBUG] ZPush::CommandNeedsAuthentication(4): true
... [DEBUG] PHP version: 5.2.10 - z-push Zimbra Backend version: 53.2.z-push-2.beta2
... [DEBUG] START Logon { username = myUser; domain = myDomain; password = <hidden> }
... [DEBUG] DeviceAgent [NokiaE71/3.00(73)MailforExchange] - Protocol Version [] - this->_folders IS EMPTY
... [DEBUG] Smart Folders ENABLED - User Profile files will be ignored
... [DEBUG] Found *SyncConfig* folder with [1] Directives
... [DEBUG] END Logon { connected = true; uid = myUser - 82 Folders Loaded }
... [DEBUG] START Setup { store = myUser; checkACLonly = 1; folderid = }
... [DEBUG] ZimbraBackend->Setup(): Checking ACLs for main user - Return TRUE.
... [DEBUG] ZPush::CommandNeedsPlainInput(4): false
... [DEBUG] START GetAttachmentData { attname = '2:95538:2' }
... [DEBUG] END GetAttachmentData { application/pdf }
... [DEBUG] HandleGetAttachment(): attachment stream from backend: Resource id #139
... [DEBUG] HandleGetAttachment(): attachment with 1380 KB sent to mobile
... [DEBUG] START Logoff
... [DEBUG] MEMORY - REAL Now (7,340,032) Peak [9,175,040] - ALLOCATED Now (6,572,388) Peak [8,240,212] - END Logoff
... [DEBUG] LoopDetection->ProcessLoopDetectionTerminate()
... [DEBUG] -------- End
WM 6.5 phone requesting the same attachment - issues an ItemOperations Fetch request with a FileReference - which uses THE SAME backend function GetAttachmentData - which returns a stream - BUT THE STREAM IS NOT EXPLICITLY HANDLED BY THE ITEMOPERATIONS handler code
- Code: Select all
... [DEBUG] -------- Start
... [ INFO] Version='SVN trunk/src r1386' method='POST' from='192.168.200.20' cmd='ItemOperations' getUser='myUser' devId='WM6.5....e534c664529ab64323134af' devType='SP'
... [DEBUG] Used timezone 'Europe/Dublin'
... [DEBUG] Including backend file: '/var/www/html/trunk/src/backend/zimbra/zimbra.php'
... [DEBUG] Using data from base64 encoded query string
... [DEBUG] Request::ProcessHeaders() ASVersion: 14
... [DEBUG] ZPush::CommandNeedsProvisioning(19): true
... [DEBUG] FileStateMachine->GetState() on file: '/var/lib/z-push/f/a/WM6.5....e534c664529ab64323134af-devicedata'
... [DEBUG] ASDevice data loaded for user: 'myUser'
... [DEBUG] TopCollector(): Initialized mutexid Resource id #111 and memid 112.
... [DEBUG] LoopDetection(): Initialized mutexid Resource id #114 and memid 115.
... [DEBUG] ZPush::HierarchyCommand(19): false
... [DEBUG] DeviceManager->ProvisioningRequired('626818530') saved device key '626818530': false
... [DEBUG] ZPush::CommandNeedsAuthentication(19): true
... [DEBUG] PHP version: 5.2.10 - z-push Zimbra Backend version: 53.2.z-push-2.beta2
... [DEBUG] START Logon { username = myUser; domain = myDomain.ie; password = <hidden> }
... [DEBUG] DeviceAgent [unknown] - Protocol Version [] - this->_folders IS EMPTY
... [DEBUG] Smart Folders ENABLED - User Profile files will be ignored
... [DEBUG] Found *SyncConfig* folder with [1] Directives
... [DEBUG] END Logon { connected = true; uid = myUser - 82 Folders Loaded }
... [DEBUG] START Setup { store = myUser; checkACLonly = 1; folderid = }
... [DEBUG] ZimbraBackend->Setup(): Checking ACLs for main user - Return TRUE.
... [DEBUG] ZPush::CommandNeedsPlainInput(19): false
... [WBXML] I <ItemOperations:ItemOperations>
... [WBXML] I <ItemOperations:Fetch>
... [WBXML] I <ItemOperations:Store>
... [WBXML] I Mailbox
... [WBXML] I </ItemOperations:Store>
... [WBXML] I <AirSyncBase:FileReference>
... [WBXML] I 2:95538:2
... [WBXML] I </AirSyncBase:FileReference>
... [WBXML] I </ItemOperations:Fetch>
... [WBXML] I </ItemOperations:ItemOperations>
... [WBXML] O <ItemOperations:ItemOperations>
... [WBXML] O <ItemOperations:Status>
... [WBXML] O 1
... [WBXML] O </ItemOperations:Status>
... [WBXML] O <ItemOperations:Response>
... [WBXML] O <ItemOperations:Fetch>
... [WBXML] O <ItemOperations:Status>
... [WBXML] O 1
... [WBXML] O </ItemOperations:Status>
... [WBXML] O <AirSyncBase:FileReference>
... [WBXML] O 2:95538:2
... [WBXML] O </AirSyncBase:FileReference>
... [DEBUG] START GetAttachmentData { attname = '2:95538:2' }
... [DEBUG] END GetAttachmentData { application/pdf }
... [WBXML] O <ItemOperations:Properties>
... [WBXML] O <AirSyncBase:ContentType>
... [WBXML] O application/pdf
... [WBXML] O </AirSyncBase:ContentType>
... [WBXML] O <ItemOperations:Part>
... [WBXML] O 1
... [WBXML] O </ItemOperations:Part>
... [WBXML] O </ItemOperations:Properties>
... [WBXML] O </ItemOperations:Fetch>
... [WBXML] O </ItemOperations:Response>
... [WBXML] O </ItemOperations:ItemOperations>
... [DEBUG] START Logoff
... [DEBUG] MEMORY - REAL Now (7,340,032) Peak [9,175,040] - ALLOCATED Now (6,638,908) Peak [8,265,916] - END Logoff
... [DEBUG] LoopDetection->ProcessLoopDetectionTerminate()
... [DEBUG] -------- End
Perhaps the handler for the ItemOperations needs to be changed to work with streams ?
Or, perhaps we need 2 different backend functions - one to handle GetAttachmentData returning a stream, and another to handle ItemOperations Fetch returning the actual file data.
Let me know what you think.
Vincent