[Tickets #12486] Re: Can't download attachments over ActiveSync

noreply at bugs.horde.org noreply at bugs.horde.org
Thu Jul 25 15:19:43 UTC 2013


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/12486
------------------------------------------------------------------------------
  Ticket             | 12486
  Updated By         | Michael Rubinsky <mrubinsk at horde.org>
  Summary            | Can't download attachments over ActiveSync
  Queue              | Synchronization
  Version            | Git master
  Type               | Bug
  State              | Not A Bug
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


Michael Rubinsky <mrubinsk at horde.org> (2013-07-25 15:19) wrote:

I don't know what else to tell you. It's something wrong with your  
PHP/Apache. PHP 5.3.3 is 3 years old. There were hundreds of bugs  
fixed since then, and at least a dozen stream related fixes.

My guess is that it's a bug in PHP's stream filter handling but that's  
just an educated guess.  If you would rather poke around the code than  
update PHP, you can look in  
Horde_ActiveSync_Message_AirSyncBaseFileAttachment::_checkEncoding()  
or Horde_ActiveSync_Wbxml_Encoder::_outTermStr()

The former adds a stream filter to encode the data to base64 as  
required by the spec. The later is where the stream is ouput 8192  
bytes at a time.

If you insist on not upgrading your 3 year old PHP you can read out  
the stream into a string, convert it to base64 and return it from the  
first method (though this will absolutely kill performance as the  
entire attachment will be kept in memory, along with the larger base64  
encoded version of it).





More information about the bugs mailing list