Index: modules/http/http_filters.c =================================================================== --- modules/http/http_filters.c (revision 1523591) +++ modules/http/http_filters.c (working copy) @@ -352,6 +352,10 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bu return APR_EAGAIN; } + if (rv == APR_EOF) { + return APR_ECONNABORTED; + } + if (rv != APR_SUCCESS) { return rv; } @@ -409,6 +413,11 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bu return APR_EAGAIN; } + if (rv == APR_EOF && ctx->state != BODY_NONE + && ctx->remaining > 0) { + return APR_ECONNABORTED; + } + if (rv != APR_SUCCESS) { return rv; } @@ -425,7 +434,8 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bu if (ctx->remaining > 0) { e = APR_BRIGADE_LAST(b); if (APR_BUCKET_IS_EOS(e)) { - return APR_EOF; + apr_bucket_delete(e); + return APR_ECONNABORTED; } } else if (ctx->state == BODY_CHUNK_DATA) { @@ -473,6 +483,10 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bu return APR_EAGAIN; } + if (rv == APR_EOF) { + return APR_ECONNABORTED; + } + if (rv != APR_SUCCESS) { return rv; }