httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <joe+gm...@sunstarsys.com>
Subject Re: Generated spool file okay to copy after parse?
Date Thu, 07 Jul 2005 20:10:26 GMT
Jeffrey Horner <jeff.horner@vanderbilt.edu> writes:

> Since I set the brigade limit to 0, libapreq will generate a brigade with 1
> spool bucket for each file param uploaded. Poking through the libapreq
> code and the apr code, I see that on UNIX that writev() is called to
> ultimately write to the spool file. Can I reasonable assume that it's
> okay to expose that spool file name to my script engine to allow code
> to copy that file to another location? 

Maybe :-).  The internal behavior of the spool brigades is something
we need to work on from the httpd-side, since they have slightly
different needs.  I want to see our spool buckets become a bit
smarter: right now mod_apreq2 is creating multiple spool files
when it could (in principle) consolidate them into a single file.
The safest thing for you to do right now is to write copy the brigade
to a separate file.  You shouldn't peek inside the brigade to
look at the bucket types yet; ideally we'll provide another 
utility function to intelligently write the spool brigade to 
a file (here's my +1 for a patch to apreq_util.[ch] that adds an 
apreq_brigade_copy_to_file function).

> BTW - the whole apreq_param_t and apreq_value_t code is pretty sweet.

Glad you like it ;-)

-- 
Joe Schaefer


Mime
View raw message