You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ryan Morgan <rm...@covalent.net> on 2001/04/12 19:09:28 UTC

[PATCH] ap_f*

I think there is a problem with the ap_f* wrappers in httpd.  If the flush
function is invoked from within apr_brigade_write, we end up skipping over
a filter.

The ap_f* fuctions are defined as:

#define ap_fputs(f, bb, str) \
    apr_brigade_puts(bb, ap_filter_flush, (f)->next, str)

If we decide to flush from within apr_brigade_write, ap_filter_flush is
called with f->next, causing f->next->next to be the next filter to run.
(skipping over f->next).

A small patch is attached,

Thanks,

-Ryan

Re: [PATCH] ap_f*

Posted by Greg Stein <gs...@lyra.org>.
On Thu, Apr 12, 2001 at 10:09:28AM -0700, Ryan Morgan wrote:
> 
> I think there is a problem with the ap_f* wrappers in httpd.  If the flush
> function is invoked from within apr_brigade_write, we end up skipping over
> a filter.
> 
> The ap_f* fuctions are defined as:
> 
> #define ap_fputs(f, bb, str) \
>     apr_brigade_puts(bb, ap_filter_flush, (f)->next, str)
> 
> If we decide to flush from within apr_brigade_write, ap_filter_flush is
> called with f->next, causing f->next->next to be the next filter to run.
> (skipping over f->next).

Well, I don't see the f->next->next anywhere, but simply skipping "f" is the
wrong item here. So... the patch is right, but your explanation seems a bit
off :-)

It looks like rbb's commit had a good explanation, tho.

All set!

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Re: [PATCH] ap_f*

Posted by rb...@covalent.net.
Looks good.  You missed two functions in util_filter.c, but I have them in
my patch.  Committing in a few minutes.

Ryan

On Thu, 12 Apr 2001, Ryan Morgan wrote:

>
> I think there is a problem with the ap_f* wrappers in httpd.  If the flush
> function is invoked from within apr_brigade_write, we end up skipping over
> a filter.
>
> The ap_f* fuctions are defined as:
>
> #define ap_fputs(f, bb, str) \
>     apr_brigade_puts(bb, ap_filter_flush, (f)->next, str)
>
> If we decide to flush from within apr_brigade_write, ap_filter_flush is
> called with f->next, causing f->next->next to be the next filter to run.
> (skipping over f->next).
>
> A small patch is attached,
>
> Thanks,
>
> -Ryan
>


_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------