httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Issac Goldstand" <mar...@beamartyr.net>
Subject Re: apreq-2 uploads as bucket brigades?
Date Sun, 19 Jan 2003 17:59:10 GMT
OK, but...
Why not do both?  Eg, provide access via bucket brigades and also keep the
spooled files for more natural seek()ing (,etc)?

  Issac

----- Original Message -----
From: "Joe Schaefer"
Subject: apreq-2 uploads as bucket brigades?


>
> 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.
>
> 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?
>
> --
> Joe Schaefer
>


Mime
View raw message