Return-Path: X-Original-To: apmail-httpd-cvs-archive@www.apache.org Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 561ED10737 for ; Wed, 12 Mar 2014 12:37:34 +0000 (UTC) Received: (qmail 35677 invoked by uid 500); 12 Mar 2014 12:37:31 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 35457 invoked by uid 500); 12 Mar 2014 12:37:31 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 35445 invoked by uid 99); 12 Mar 2014 12:37:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Mar 2014 12:37:30 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Mar 2014 12:37:28 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 5EEB5238897A; Wed, 12 Mar 2014 12:37:07 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1576714 - in /httpd/httpd/branches/2.2.x: ./ modules/proxy/mod_proxy_http.c Date: Wed, 12 Mar 2014 12:37:07 -0000 To: cvs@httpd.apache.org From: rpluem@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140312123707.5EEB5238897A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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; }