You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2014/03/02 21:18:03 UTC

svn commit: r1573359 - in /httpd/httpd/branches/2.4.x: ./ STATUS modules/proxy/proxy_util.c

Author: jim
Date: Sun Mar  2 20:18:03 2014
New Revision: 1573359

URL: http://svn.apache.org/r1573359
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/backported by: jim

Modified:
    httpd/httpd/branches/2.4.x/   (props changed)
    httpd/httpd/branches/2.4.x/STATUS
    httpd/httpd/branches/2.4.x/modules/proxy/proxy_util.c

Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk:r1572543

Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1573359&r1=1573358&r2=1573359&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Sun Mar  2 20:18:03 2014
@@ -98,14 +98,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-   * mod_proxy: 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.
-                Follows up r1534321 and r1550061 already backported to 2.4.8.
-     trunk patch: http://svn.apache.org/r1572543
-     2.4.x patch: trunk works
-     +1: ylavic, jim, rpluem
-
    * mod_ssl: Remove the hardcoded algorithm-type dependency for the
      SSLCertificateFile and SSLCertificateKeyFile directives, and deprecate
      SSLCertificateChainFile. A detailed list of the changes is included

Modified: httpd/httpd/branches/2.4.x/modules/proxy/proxy_util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/proxy/proxy_util.c?rev=1573359&r1=1573358&r2=1573359&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/proxy/proxy_util.c (original)
+++ httpd/httpd/branches/2.4.x/modules/proxy/proxy_util.c Sun Mar  2 20:18:03 2014
@@ -3372,6 +3372,9 @@ PROXY_DECLARE(int) ap_proxy_pass_brigade
     if (transferred != -1)
         p_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_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(01084)
                       "pass request body failed to %pI (%s)",
@@ -3391,7 +3394,6 @@ PROXY_DECLARE(int) ap_proxy_pass_brigade
             return HTTP_BAD_REQUEST;
         }
     }
-    apr_brigade_cleanup(bb);
     return OK;
 }