On Aug 26, 2006, at 8:29 AM, Joachim Zobel wrote:
Am Freitag, den 25.08.2006, 23:22 +0200 schrieb Ruediger Pluem:
c->aborted is set to 1 in this case. Just check for it once you
return from ap_pass_brigade.
Thx. For the convienience of those who google:
rv = ap_pass_brigade(f->next, sctx->bb) ;
if (rv != APR_SUCCESS
|| f->c->aborted) {
return rv;
}
is what I do for now.
And it's what other areas in httpd do as well (see
ap_content_length_filter()
for example).
I just found the header (in 2.2.2) for ap_pass_brigade says:
Pass the current bucket brigade down to the next filter on the filter
stack. The filter returns an apr_status_t value. If the bottom-most
filter doesn't write to the network, then ::AP_NOBODY_WROTE is
returned.
IMHO it is a bug if software does not behave as documented. How do we
fix this? Should ap_pass_brigade check c->aborted an adjust the
filters
return accordingly? This is much preferable to having every filter do
what I do now.
Note that we still try flushing the connection even if
aborted is true. So the assumption is that even with
aborted, we may have *something* on the line.