Return-Path: Delivered-To: apmail-httpd-apreq-dev-archive@httpd.apache.org Received: (qmail 73818 invoked by uid 500); 19 Jan 2003 22:38:21 -0000 Mailing-List: contact apreq-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list apreq-dev@httpd.apache.org Received: (qmail 73807 invoked from network); 19 Jan 2003 22:38:21 -0000 Message-ID: <3E2B290C.90707@stason.org> Date: Mon, 20 Jan 2003 09:39:08 +1100 From: Stas Bekman Organization: Hope, Humanized User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Joe Schaefer Cc: apreq list Subject: Re: apreq-2 uploads as bucket brigades? References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Joe Schaefer wrote: > I'd like to drop the req->upload linked list of temp files, > and use bucket brigades in their place. I'd planning to > use a common apreq_param_t struct which extends apreq_value_t > like so: > > struct apreq_param_t { > enum { ASCII, UTF_8, UTF_16, IS0_LATIN_1 } charset; > char *language; > apreq_table_t *info; /* mime headers */ > > apr_bucket_brigade *bb; /* represents file contents */ > > apreq_value_t v; > }; > > > The main advantage of this approach would be that we can use > the full bucket api for managing the upload data. The brigade > could use heap-allocated buckets for smaller uploads, and then > switch over to mmapped or file buckets after a certain size. > The bucket API makes this look pretty easy. And you can even write upload hook filters with that ;) I agree that using a polished bb API, will make apreq's code more robust, and may be shorter? > The main disadvantage of this approach would be that we'd need > to support the full bucket api for managing the upload. > With actual files, seek(), dup(), link(), and buffered read() > are natural operations. I think we'd have to provide a > compatibility layer for some of these, perhaps using a > meta-bucket at the front of the brigade? Why would you really want to support all of them? Just croak for non-implemented ones and if wanted the implementation can come later. __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:stas@stason.org http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com