Cleanup the client to backend brigade before returning an error (if any) to avoid buckets lifetime issues (backend connection's pool destroyed before request's one). PR 50335.
Suggested by rpluem.
Submitted by: ylavic
Reviewed by: ylavic, rpluem, wrowe
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@
1576714 13f79535-47bb-0310-9956-
ffa450edef68
if (transferred != -1)
conn->worker->s->transferred += transferred;
status = ap_pass_brigade(origin->output_filters, bb);
+ /* Cleanup the brigade now to avoid buckets lifetime
+ * issues in case of error returned below. */
+ apr_brigade_cleanup(bb);
if (status != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
"proxy: pass request body failed to %pI (%s)",
return HTTP_BAD_REQUEST;
}
}
- apr_brigade_cleanup(bb);
return OK;
}