httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yla...@apache.org
Subject svn commit: r1774322 - /httpd/httpd/trunk/modules/http/http_filters.c
Date Wed, 14 Dec 2016 19:16:59 GMT
Author: ylavic
Date: Wed Dec 14 19:16:59 2016
New Revision: 1774322

URL: http://svn.apache.org/viewvc?rev=1774322&view=rev
Log:
http: release data buckets (memory, fd, ...) as soon as possible when
filtered out from the outgoing brigade by ap_http_outerror_filter() applying
the EOC semantic.

Modified:
    httpd/httpd/trunk/modules/http/http_filters.c

Modified: httpd/httpd/trunk/modules/http/http_filters.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http/http_filters.c?rev=1774322&r1=1774321&r2=1774322&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http/http_filters.c (original)
+++ httpd/httpd/trunk/modules/http/http_filters.c Wed Dec 14 19:16:59 2016
@@ -1806,12 +1806,12 @@ apr_status_t ap_http_outerror_filter(ap_
      *              EOS bucket.
      */
     if (ctx->seen_eoc) {
-        for (e = APR_BRIGADE_FIRST(b);
-             e != APR_BRIGADE_SENTINEL(b);
-             e = APR_BUCKET_NEXT(e))
-        {
-            if (!APR_BUCKET_IS_METADATA(e)) {
-                APR_BUCKET_REMOVE(e);
+        e = APR_BRIGADE_FIRST(b);
+        while (e != APR_BRIGADE_SENTINEL(b)) {
+            apr_bucket *c = e;
+            e = APR_BUCKET_NEXT(e);
+            if (!APR_BUCKET_IS_METADATA(c)) {
+                apr_bucket_delete(c);
             }
         }
     }



Mime
View raw message