You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rb...@apache.org on 2001/04/23 19:29:03 UTC

cvs commit: httpd-2.0/include util_filter.h

rbb         01/04/23 10:29:02

  Modified:    include  util_filter.h
  Log:
  Document the new argument to ap_get_brigade()
  
  Revision  Changes    Path
  1.51      +2 -0      httpd-2.0/include/util_filter.h
  
  Index: util_filter.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/include/util_filter.h,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -d -b -w -u -r1.50 -r1.51
  --- util_filter.h	2001/04/22 22:19:27	1.50
  +++ util_filter.h	2001/04/23 17:28:58	1.51
  @@ -272,6 +272,8 @@
    * @param filter The next filter in the chain
    * @param bucket The current bucket brigade
    * @param mode   ::AP_MODE_BLOCKING, ::AP_MODE_NONBLOCKING, or ::AP_MODE_PEEK
  + * @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);
  
  
  

Re: cvs commit: httpd-2.0/include util_filter.h

Posted by rb...@covalent.net.
On Mon, 23 Apr 2001, Graham Leggett wrote:

> rbb@apache.org 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                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Re: cvs commit: httpd-2.0/include util_filter.h

Posted by Graham Leggett <mi...@sharp.fm>.
rbb@apache.org 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?

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.

Regards,
Graham
-- 
-----------------------------------------
minfrin@sharp.fm		"There's a moon
					over Bourbon Street
						tonight..."