[imp] Re: Patch for mbox downloads in IMP 3.2.5
ross at rbecker.org
Wed Sep 8 14:47:03 PDT 2004
I'll probably take this on tomorrow. The new code supports zipping
the mbox prior to delivery- I'll have to spend a bit more time grokking
the code before altering it to support that. The changes to lib/File.php
are still identical though.
Ross Becker wrote:
> Only one reason- ignorance ;)
> I'm old-hand programmer, but far less old-hand at PHP. I used mod_perl
> to do web development for quite a number of years.
> I'm sure it will only take me a short bit to pull CVS HEAD and apply
> these changes there. I'll update it to use fpassthru() at the same time.
> Chuck Hagenbuch wrote:
>> 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()?
>> "Regard my poor demoralized mule!" - Juan Valdez
More information about the imp