[imp] Patch for mbox downloads in IMP 3.2.5

Chuck Hagenbuch chuck at horde.org
Wed Sep 8 14:31:52 PDT 2004


Quoting Ross Becker <ross at rbecker.org>:

> I've patched IMP 3.2.5 to use a tmpfile() stream for generating mboxes
> for download- this way they're automatically removed if the PHP process
> goes away for an unexpected reason.  It gets a tmpfile, generates the
> mbox from the folder into that, returns the file handle, then seeks to
> the end and uses ftell() to find the size of the stream, and then does
> 8k blocks to deliver this to the user. This prevents large mail folders
> from blowing up PHP's memory size. I've generated a unified diff of my
> changes- is there any interest in this patch for going into CVS?

It'd be best if it was against CVS HEAD, but it's an interesting idea. 
I've been
looking at Zend Download Server as well; I may write a class for 
wrapping either
this behavior or ZDS.

Btw, any reason you didn't use fpassthru()?

-chuck

--
"Regard my poor demoralized mule!" - Juan Valdez


More information about the imp mailing list