You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rp...@apache.org on 2014/03/12 13:37:07 UTC
svn commit: r1576714 - in /httpd/httpd/branches/2.2.x: ./
modules/proxy/mod_proxy_http.c
Author: rpluem
Date: Wed Mar 12 12:37:06 2014
New Revision: 1576714
URL: http://svn.apache.org/r1576714
Log:
Merge r1572543 from trunk:
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
Modified:
httpd/httpd/branches/2.2.x/ (props changed)
httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_http.c
Propchange: httpd/httpd/branches/2.2.x/
------------------------------------------------------------------------------
Merged /httpd/httpd/trunk:r1572543
Modified: httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_http.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_http.c?rev=1576714&r1=1576713&r2=1576714&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_http.c (original)
+++ httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_http.c Wed Mar 12 12:37:06 2014
@@ -267,6 +267,9 @@ static int pass_brigade(apr_bucket_alloc
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)",
@@ -286,7 +289,6 @@ static int pass_brigade(apr_bucket_alloc
return HTTP_BAD_REQUEST;
}
}
- apr_brigade_cleanup(bb);
return OK;
}