Shouldn't we call apr_brigade_cleanup in any case after ap_pass_brigade? Regards
Rüdiger > -----Ursprüngliche Nachricht----- > Von: Yann Ylavic [mailto:[email protected]] > Gesendet: Donnerstag, 27. April 2017 11:47 > An: httpd-dev <[email protected]> > Betreff: Re: svn commit: r1707087 - > /httpd/httpd/trunk/modules/debugging/mod_bucketeer.c > > On Wed, Apr 26, 2017 at 11:26 AM, Stefan Eissing > <[email protected]> wrote: > > > >> Am 26.04.2017 um 11:14 schrieb Plüm, Rüdiger, Vodafone Group > <[email protected]>: > >> > >> > >> > >>> -----Ursprüngliche Nachricht----- > >>> Von: Stefan Eissing [mailto:[email protected]] > >>> Gesendet: Mittwoch, 26. April 2017 10:55 > >>> An: [email protected] > >>> Betreff: Re: svn commit: r1707087 - > >>> /httpd/httpd/trunk/modules/debugging/mod_bucketeer.c > >>> > >>> Eh, not really into mod_bucketeer and its use cases, but some > >>> observations after a quick scan: > >>> > >>> line 99: > >>> rv = ap_pass_brigade(f->next, ctx->bb); > >>> apr_brigade_cleanup(ctx->bb); > >>> > >>> line 146: > >>> rv = ap_pass_brigade(f->next, ctx->bb); > >>> if (rv) { > >>> return rv; > >>> } > >>> apr_brigade_cleanup(ctx->bb); > >>> > >>> such things only work if an EOS always comes *before* an EOR > >>> bucket (case 1) or of no DATA bucket of any kind follows an EOR. > >> > >> Correct, but with the BUCKETEER filter being a resource filter that > >> should not happen. > > > > Because the implementations of everything else in the server do not > > do it? Should we then add a filter that checks exactly that? > > I don't think that EOR before EOS can happen in HTTP/1, because > ap_finalize_request_protocol() is always called before > ap_process_request_after_handler(). > > EOS is the signal for request filters to get out of the way, so this > is probably what ap_request_core_filter() should do too, and the > purpose of the attached patch. > This patch could use EOR instead, but I find EOS more "semantically" > correct for a request filter (we don't need to set aside anything > after it), while EOR would be crash safe only... > > Jacob, does it work better? > > > Regards, > Yann.
