RE: Question about this patch to core_input_filter...

2002-04-06 Thread Cliff Woolley

On Sat, 6 Apr 2002, Ryan Bloom wrote:

> > Justin,
> > This is your patch... core_input_filter adds a socket bucket, does a
> > APR_BRIGADE_NORMALIZE
> > and then calls APR_BRIGADE_EMPTY(). How can this check ever return an
> > empty brigade?
>
> If the socket is closed on the other side, then the bucket code will
> remove the socket from the brigade.

Right.  Well, more precisely, it morphs itself to a zero-length immortal
bucket, which is then removed from the brigade by APR_BRIGADE_NORMALIZE.

--Cliff


--
   Cliff Woolley
   [EMAIL PROTECTED]
   Charlottesville, VA





RE: Question about this patch to core_input_filter...

2002-04-06 Thread Ryan Bloom

> Justin,
> This is your patch... core_input_filter adds a socket bucket, does a
> APR_BRIGADE_NORMALIZE
> and then calls APR_BRIGADE_EMPTY(). How can this check ever return an
> empty brigade?


If the socket is closed on the other side, then the bucket code will
remove the socket from the brigade.

Ryan





Re: Question about this patch to core_input_filter...

2002-04-06 Thread Bill Stoddard


> Justin,
> This is your patch... core_input_filter adds a socket bucket, does a
APR_BRIGADE_NORMALIZE
> and then calls APR_BRIGADE_EMPTY(). How can this check ever return an empty brigade?
> Bill
>
> ===
> RCS file: /home/cvspublic/httpd-2.0/server/core.c,v
> retrieving revision 1.144
> retrieving revision 1.145
> diff -u -r1.144 -r1.145
> --- httpd-2.0/server/core.c 2002/02/05 22:56:44 1.144
> +++ httpd-2.0/server/core.c 2002/02/06 02:24:18 1.145
> @@ -3062,9 +3062,13 @@
>  /* ### This is bad. */
>  APR_BRIGADE_NORMALIZE(ctx->b);
>
> -/* check for empty brigade *AFTER* APR_BRIGADE_NORMALIZE() */
> +/* check for empty brigade *AFTER* APR_BRIGADE_NORMALIZE()
> + * If we have lost our socket bucket (see above), we are EOF.

Let me ask a different way... Referring to the comment above, how can we loose a socket
bucket that was just created?

Thanks,
Bill