[dev] [commits] Horde branch master updated. f174f08002872dab2019bcca58175749f598bb6a

Michael J Rubinsky mrubinsk at horde.org
Mon Mar 3 19:20:49 UTC 2014


Quoting Michael M Slusarz <slusarz at horde.org>:

> Quoting Michael J Rubinsky <mrubinsk at horde.org>:
>
>> Quoting "Michael J. Rubinsky" <mrubinsk at horde.org>:
>>
>>> The branch "master" has been updated.
>>> The following is a summary of the commits.
>>>
>>> from: 5001def3d7521ce8cdfdcf6317a3c5617693494e
>>>
>>> f174f08 Fix obtaining BINARY.SIZE.
>>
>> To clarify, this was broken by an incorrect fix for Bug: 12992.
>
> This is incorrect.
>
> Bodypart size queries are added using the  
> Horde_Imap_Client_Fetch_Query#bodyPartSize() method:
>
>     public function bodyPartSize($id)
>     {
>         $this->_data[Horde_Imap_Client::FETCH_BODYPARTSIZE][$id] = true;
>     }
>
> As seen, the MIME ID is stored in the KEY, not the value.  Thus,  
> this line is correct:
>
> foreach (array_keys($c_val) as $key) {
>
> Your patch (by removing array_keys()) is simply changing the code to  
> do a bodypartsize fetch on MIME ID 1 (boolean true = integer 1) for  
> every bodypartsize query.

Well, a var_dump of $c_val, at this point in the code, shows otherwise  
on my installation. It shows the array keys always numerically  
indexed, starting with 0 and the values always containing the mime_id.


> The problem remains that the calling code is setting MIME ID = 0 for  
> Horde_Imap_Client_Fetch_Query#bodyPartSize().  That is not allowed  
> (bodypartsize only works on a specific mime part, not the entire  
> message which is what we treat MIME ID 0 as).

The calling code is absolutely NOT passing 0 as the mime id. I have  
verified this multiple times. In fact, the same variable is passed to  
both Horde_Imap_Client_Fetch_Query#bodyPartSize() and  
Horde_Imap_Client_Fetch_Query#bodyPart(). Without this fix, the IMAP  
log shows the correct mime id being used for the body part, but the  
incorrect (0) id being used for the size. This happens in  
Horde_ActiveSync_Imap_Message#getMessageBodyData(). I can 100%  
guarantee that a non-zero value is being passed to these functions.

> This will be reverted.

-- 
mike
The Horde Project
http://www.horde.org
https://www.facebook.com/hordeproject
https://www.twitter.com/hordeproject

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5849 bytes
Desc: S/MIME Signature
URL: <http://lists.horde.org/archives/dev/attachments/20140303/cc8025d0/attachment.bin>


More information about the dev mailing list