httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yla...@apache.org
Subject svn commit: r1572543 - /httpd/httpd/trunk/modules/proxy/proxy_util.c
Date Thu, 27 Feb 2014 13:05:25 GMT
Author: ylavic
Date: Thu Feb 27 13:05:24 2014
New Revision: 1572543

URL: http://svn.apache.org/r1572543
Log:
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.

Modified:
    httpd/httpd/trunk/modules/proxy/proxy_util.c

Modified: httpd/httpd/trunk/modules/proxy/proxy_util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/proxy_util.c?rev=1572543&r1=1572542&r2=1572543&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/proxy_util.c (original)
+++ httpd/httpd/trunk/modules/proxy/proxy_util.c Thu Feb 27 13:05:24 2014
@@ -3422,6 +3422,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)",
@@ -3441,7 +3444,6 @@ PROXY_DECLARE(int) ap_proxy_pass_brigade
             return HTTP_BAD_REQUEST;
         }
     }
-    apr_brigade_cleanup(bb);
     return OK;
 }
 



Mime
View raw message