On Mon, 23 Apr 2001, Graham Leggett wrote:
> [EMAIL PROTECTED] wrote:
>
> > + * @param readbytes How many bytes to read from the next filter. 0 means that
> > + * a single line should be read.
> > */
> > AP_DECLARE(apr_status_t) ap_get_brigade(ap_filter_t *filter, apr_bucket_brigade
>*bucket,
> > ap_input_mode_t mode, apr_size_t
>*readbytes);
>
> Just to clarify - does this mean that ap_get_brigade() with a readbytes
> of zero will always return a single line (CRLF terminated), without the
> need to call it repeatedly until a complete line is returned?
It works the exact same way that it used to work, except that instead of
filling out c->remain, you pass the value down the stack.
> Is there a guaranteed minumim length that will be returned? ie is it
> reasonable to assume that if ap_get_brigade() was called once, and you
> were expecting a status line or a header line, you would get the whole
> line unless the line is ridiculously long? If so I can simplify the
> proxy code.
There are no garauntees about how much data is actually returned. It is
also not possible to make any garauntees about this. What happens if the
client doesn't send a full line of data. We still have to return what we
got.
Ryan
_______________________________________________________________________________
Ryan Bloom [EMAIL PROTECTED]
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------