On Sunday 23 September 2001 03:12 pm, Justin Erenkrantz wrote:
> On Sun, Sep 23, 2001 at 03:04:54PM -0700, Ryan Bloom wrote:
> > That would be true if this function were to go into httpd, but it isn't.
> > It is going into APR-util, and there is nothing saying that you will have
> > a brigade of a defined size.
>
> The doc for my proposed function (ap_brigade_to_buffer) says so. =-)
> Otherwise, this function is useless - you have to have a defined
> size in order to copy it to a flat buffer.
>
> I used apr_brigade_partition to ensure that I had a defined length.
> If the partition failed, then it would have refused to copy.
Okay. I still think it is bogus to have a function that takes an arbitrary brigade,
and tries to flatten it into a string, and does so by always calling
APR_READ_BLOCK. Actually, I think the whole function is bogus when I
really think about it. We have already copied the data once, when we read
it from the socket. We should really fix the ap_get_client_block API to either
return a bucket brigade, or it should return a pointer to a string.
What we are doing now, is forcing our clean bucket API into an API designed
around the BUFF logic.
Ryan
______________________________________________________________
Ryan Bloom [EMAIL PROTECTED]
Covalent Technologies [EMAIL PROTECTED]
--------------------------------------------------------------