summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2015-10-06 16:22:24 +0000
committerYann Ylavic <ylavic@apache.org>2015-10-06 16:22:24 +0000
commitb5ba68925157ef87c856421b4565608cda58c2f2 (patch)
tree259d57bee710456484718ff71e6b9399860b5f5d
parenta8806f4fb20b47e5d9e00595f0ed23a26210e882 (diff)
downloadhttpd-b5ba68925157ef87c856421b4565608cda58c2f2.tar.gz
eor_bucket: don't destroy the request multiple times should any filter
do a copy (e.g. mod_bucketeer). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1707084 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--server/eor_bucket.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/server/eor_bucket.c b/server/eor_bucket.c
index 4d3e1ecfbe..c7f1862281 100644
--- a/server/eor_bucket.c
+++ b/server/eor_bucket.c
@@ -91,12 +91,23 @@ static void eor_bucket_destroy(void *data)
}
}
+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
};