On Wed, Nov 23, 2011 at 9:15 AM, Jim Jagielski <j...@apache.org> wrote: > > On Nov 23, 2011, at 7:07 AM, Igor Galić wrote: > >> >> >> [snip] >>> mod_negotiation: don't return non-AP_FILTER_ERROR filter return >>> values >> [snip] >>> + rv = ap_pass_brigade(r->output_filters, bb); >>> + if (rv != APR_SUCCESS) { >>> + if (rv != AP_FILTER_ERROR) { >>> + ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r, >>> + "ap_pass_brigade returned %d", rv); >>> + return HTTP_INTERNAL_SERVER_ERROR; >>> + } >>> + return AP_FILTER_ERROR; >>> + } >>> + return OK; >> >> It looks like exactly this kind of code would or should be used >> all over the place -- maybe we should put that in a function/macro? >> > > ap_pass_brigade_errchk(r, bb) > > and the above could compress to > > return ap_pass_brigade_errchk(r, bb); > > +1 > > Unless someone beats me to it, will add to trunk and backport > to 2.4...
maybe additionally a char* for the caller to add a msg -- it was useful in this case to find out what the handler was.