6.0.0-beta1
7/4/25

[#6957] Problem with appledouble Viewer
Summary Problem with appledouble Viewer
Queue IMP
Queue Version HEAD
Type Bug
State Resolved
Priority 1. Low
Owners slusarz (at) horde (dot) org
Requester scalero (at) datadec (dot) es
Created 06/19/2008 (6224 days ago)
Due 06/19/2008 (6224 days ago)
Updated 11/14/2008 (6076 days ago)
Assigned 11/09/2008 (6081 days ago)
Resolved 11/14/2008 (6076 days ago)
Github Issue Link
Github Pull Request
Milestone 5
Patch No

History
11/14/2008 08:41:18 PM Michael Slusarz Comment #12
State ⇒ Resolved
Reply to this comment
Looking at this a bit more - there is nothing to do here above/beyond 
the MIME/display rewrite.  So closing.
11/09/2008 07:53:43 AM Michael Slusarz Comment #11
Version ⇒ HEAD
Reply to this comment
Leave it open, if just so I can easily find to test when needed.
11/09/2008 03:34:50 AM Chuck Hagenbuch Comment #10
State ⇒ Assigned
Reply to this comment
Michael, is there anything specific here to do in the MIME rewrite, or 
can it be closed?
07/15/2008 06:31:30 AM scalero (at) datadec (dot) es Comment #9 Reply to this comment
OK, I will not send more comments to this ticket, but I still think 
there is a bug in appledouble viewer because 'mimeCache' parameter 
changes in every request and the Parts of the message can not be 
obtained from the cache.



Greetings and thanks.



Sebastián Calero.
07/15/2008 04:55:16 AM Michael Slusarz Comment #8 Reply to this comment
Any response to my last coments??
No, nothing in addition to what has already been previously posted.
07/10/2008 07:00:37 AM scalero (at) datadec (dot) es Comment #7 Reply to this comment
Any response to my last coments??



Greetings and thanks.



Sebastián Calero.
07/03/2008 07:34:09 AM scalero (at) datadec (dot) es Comment #6 Reply to this comment
Sorry, but I think that something is wrong with IMP 4(4.2 - webmail 1.1).



I have a message with 4 'application/applefile' parts, with 4 .PSD 
embedded files, and now I follow this steps to get the IMP error:



1.- I open the message and try to download a .PSD files. It's OK and I 
get the file.



2.- Go to 'mailbox.php' or any other IMP page.



3.- Go back to the original message and reopen it, try now to download 
any of the .PSD files, do not get a blank page? I can not download any 
.PSD files now.



I have not been able to attach a mail sample because its size >10 Mb, 
I imagine.





Greetings and thanks.



Sebastián Calero.
07/03/2008 06:57:51 AM scalero (at) datadec (dot) es Comment #5 Reply to this comment

[Show Quoted Text - 11 lines]
Yes, I enable 'large_items', this is my conf.php lines for memcache:



$conf['memcache']['enabled'] = true;

$conf['memcache']['hostspec'] = array('localhost');

$conf['memcache']['port'] = array('9000');

$conf['memcache']['persistent'] = true;

$conf['memcache']['compression'] = true;

$conf['memcache']['c_threshold'] = 0;

$conf['memcache']['prefix'] = 'cache';

$conf['memcache']['large_items'] = true;

[Show Quoted Text - 12 lines]
Ok, but I see the following sentence at link you send me: "Remove 
caching code from MIME_Contents". I think this is not the 'only way' 
can make these messages work although it may be the most efficient.


07/03/2008 05:43:11 AM Michael Slusarz Comment #4
State ⇒ Stalled
Milestone ⇒ 5
Reply to this comment
A posible solution is this change in
'imp/lib/MIME/Viewer/appledouble.php', function 'render()':
No, this is not quite correct.



There is nothing wrong with the current way we view messages - it 
could just be made more resource friendly in certain instances.  But 
since nothing is broken in IMP 4, this ticket is no more than another 
reason to do the MIME rewrite and, as such, will be marked stalled.
07/03/2008 05:38:10 AM Michael Slusarz Comment #3 Reply to this comment
1.- When I open the message my horde session is closed, I use
memcache for session container. I have follow the code and I see the
'appledouble' Viewer has a 'new MIME_Contents()' and a posterior
'$mc->buildMessage()' which cause that each part(>2Mb) is cached. OK,
this is the cause of my closed session because in memcache the size
limit per session is 1Mb, Is this right?
Wrong.  Sounds like you did not enable 'large_items' support in 
horde/config/conf.xml.  You can also change this value in the memcache 
source.
This is correct?? And by other hand, Is right to store such large
attachments in cache? It is better than to get directly the
attachments from the IMAP Server?
This is a known limitation with Horde's MIME implementation.  See:

http://wiki.horde.org/Project/HordeMime?referrer=Projects#toc3



The short answer is - this data does not exist on the IMAP server, it 
is an "embedded" MIME Part.  Since we don't have a way to access the 
part without parsing the entire message again (and this may be 
difficult to do on a separate page), caching is the only way we can 
make these messages work.
06/20/2008 08:08:25 AM Jan Schneider State ⇒ Assigned
Assigned to Michael Slusarz
 
06/19/2008 03:34:50 PM scalero (at) datadec (dot) es Comment #2 Reply to this comment
A posible solution is this change in 
'imp/lib/MIME/Viewer/appledouble.php', function 'render()':



         /* Display the content of the file. */

         $part = 
$contents->getDecodedMIMEPart($this->mime_part->getRelativeMIMEId(2));

         if ($part) {

             $mime_message = &MIME_Message::convertMIMEPart($part);

             $mc = new MIME_Contents($mime_message, array('download' 
=> 'download_attach', 'view' => 'view_attach'), array(&$contents));

+           if (isset($contents->_sessionCacheID) && 
!empty($contents->_sessionCacheID)) {

+               $mc->_sessionCacheID = $contents->_sessionCacheID;

+           }

             $mc->buildMessage();

             $text .= '<!--a75c305b1c0a6022--><table cellspacing="0">' 
. $mc->getMessage(true) . '</table>';

         }





This cause the 'multipart/appledouble' parts are not cached and the 
attachments are downloaded directly from the IMAP server. It helps?



Greetings.






06/19/2008 03:22:32 PM scalero (at) datadec (dot) es Comment #1
Priority ⇒ 1. Low
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Due ⇒ 06/19/2008
Summary ⇒ Problem with appledouble Viewer
Type ⇒ Bug
Queue ⇒ IMP
Reply to this comment
Hello, I received a message with 4 'multipart/appledouble' parts(>2Mb 
aprox. each one). And this is my experience about it:



1.- When I open the message my horde session is closed, I use memcache 
for session container. I have follow the code and I see the 
'appledouble' Viewer has a 'new MIME_Contents()' and a posterior 
'$mc->buildMessage()' which cause that each part(>2Mb) is cached. OK, 
this is the cause of my closed session because in memcache the size 
limit per session is 1Mb, Is this right?



2.- I active the Horde Cache driver with local files, and now I can 
open the message and I see 4 cache files(>2Mb) has been created, now I 
can see or download any of them.



3.- Now I go to the mailbox.php view and I continue seeing another 
messages, now I go back to see another time the message with the 4 
'multipart/appledouble' parts but now(this second time) I can not view 
or download the parts!!! when I click the links to view or download 
the 'view.php' page is empty.

     The unique difference between the source code(HTML) of the first 
time and the second is the value of 'mimeCache'. This value changes 
every time I go back to the message.





This is correct?? And by other hand, Is right to store such large 
attachments in cache? It is better than to get directly the 
attachments from the IMAP Server?







Greetings and thanks.



Sebastián Calero.

Saved Queries