httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <>
Subject [apreq-2] upload api
Date Sun, 22 Jun 2003 18:06:15 GMT

Having decided not to write a FILE-type API into
the src/ core, I think we'll have to implement the 
Apache::Upload objects in XS (instead of wrapping 
a core upload struct/API).

I'm pretty sure the memory management problem for
large uploads is now solved in current cvs.  After a
configurable size limit (cfg->max_brigade_len), the 
mfd parser appends a tempfile bucket to the end of 
the active param->bb and writes all future incoming 
buckets directly to the tempfile.  However, libapreq
users shouldn't rely on the existence of a file bucket 
at the end of param->bb, since some file uploads might 
be smaller than cfg->max_brigade_len.

Also, the simplest way for users/glue-authors to keep 
memory under control is to make a working copy of param->bb
whenever they need to loop over the brigade.  That way, 
whatever buckets are generated from the file bucket
will not stick around in param->bb.

Barring objections to the above, I hope to have most 
of the Apache::Upload XS in cvs fairly soon.

Comments welcome, as always.

Joe Schaefer

View raw message