httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yla...@apache.org
Subject svn commit: r1707084 - /httpd/httpd/trunk/server/eor_bucket.c
Date Tue, 06 Oct 2015 16:22:25 GMT
Author: ylavic
Date: Tue Oct  6 16:22:24 2015
New Revision: 1707084

URL: http://svn.apache.org/viewvc?rev=1707084&view=rev
Log:
core: don't destroy the request multiple times should any filter
copy the EOR bucket (e.g. mod_bucketeer).

Modified:
    httpd/httpd/trunk/server/eor_bucket.c

Modified: httpd/httpd/trunk/server/eor_bucket.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/eor_bucket.c?rev=1707084&r1=1707083&r2=1707084&view=diff
==============================================================================
--- httpd/httpd/trunk/server/eor_bucket.c (original)
+++ httpd/httpd/trunk/server/eor_bucket.c Tue Oct  6 16:22:24 2015
@@ -91,12 +91,23 @@ static void eor_bucket_destroy(void *dat
     }
 }
 
+static apr_status_t eor_bucket_copy(apr_bucket *a, apr_bucket **b)
+{
+    *b = apr_bucket_alloc(sizeof(**b), a->list); /* XXX: check for failure? */
+    **b = *a;
+
+    /* we don't wan't the request to be destroyed twice */
+    (*b)->data = NULL;
+
+    return APR_SUCCESS;
+}
+
 AP_DECLARE_DATA const apr_bucket_type_t ap_bucket_type_eor = {
     "EOR", 5, APR_BUCKET_METADATA,
     eor_bucket_destroy,
     eor_bucket_read,
     apr_bucket_setaside_noop,
     apr_bucket_split_notimpl,
-    apr_bucket_simple_copy
+    eor_bucket_copy
 };
 



Mime
View raw message