1
Index: modules/proxy/proxy_http.c
2
===================================================================
3
--- build-tree/apache2/modules/proxy/proxy_http.c (Revision 326480)
4
+++ build-tree/apache2/modules/proxy/proxy_http.c (Arbeitskopie)
6
* take care of that now
9
- APR_BRIGADE_CONCAT(bb, input_brigade);
12
+ * Save input_brigade in bb brigade. (At least) in the SSL case
13
+ * input_brigade contains transient buckets whose data would get
14
+ * overwritten during the next call of ap_get_brigade in the loop.
15
+ * ap_save_brigade ensures these buckets to be set aside.
16
+ * Calling ap_save_brigade with NULL as filter is OK, because
17
+ * bb brigade already has been created and does not need to get
18
+ * created by ap_save_brigade.
20
+ status = ap_save_brigade(NULL, &bb, &input_brigade, p);
21
+ if (status != APR_SUCCESS) {
25
header_brigade = NULL;
29
* take care of that now
32
- APR_BRIGADE_CONCAT(bb, input_brigade);
35
+ * Save input_brigade in bb brigade. (At least) in the SSL case
36
+ * input_brigade contains transient buckets whose data would get
37
+ * overwritten during the next call of ap_get_brigade in the loop.
38
+ * ap_save_brigade ensures these buckets to be set aside.
39
+ * Calling ap_save_brigade with NULL as filter is OK, because
40
+ * bb brigade already has been created and does not need to get
41
+ * created by ap_save_brigade.
43
+ status = ap_save_brigade(NULL, &bb, &input_brigade, p);
44
+ if (status != APR_SUCCESS) {
48
header_brigade = NULL;
52
apr_brigade_cleanup(input_brigade);
55
- APR_BRIGADE_CONCAT(body_brigade, input_brigade);
58
+ * Save input_brigade in body_brigade. (At least) in the SSL case
59
+ * input_brigade contains transient buckets whose data would get
60
+ * overwritten during the next call of ap_get_brigade in the loop.
61
+ * ap_save_brigade ensures these buckets to be set aside.
62
+ * Calling ap_save_brigade with NULL as filter is OK, because
63
+ * body_brigade already has been created and does not need to get
64
+ * created by ap_save_brigade.
66
+ status = ap_save_brigade(NULL, &body_brigade, &input_brigade, p);
67
+ if (status != APR_SUCCESS) {
73
bytes_spooled += bytes;
74
@@ -1081,9 +1123,27 @@
77
apr_brigade_length(temp_brigade, 1, &bytes);
78
- APR_BRIGADE_CONCAT(input_brigade, temp_brigade);
82
+ * Save temp_brigade in input_brigade. (At least) in the SSL case
83
+ * temp_brigade contains transient buckets whose data would get
84
+ * overwritten during the next call of ap_get_brigade in the loop.
85
+ * ap_save_brigade ensures these buckets to be set aside.
86
+ * Calling ap_save_brigade with NULL as filter is OK, because
87
+ * input_brigade already has been created and does not need to get
88
+ * created by ap_save_brigade.
90
+ status = ap_save_brigade(NULL, &input_brigade, &temp_brigade, p);
91
+ if (status != APR_SUCCESS) {
92
+ ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
93
+ "proxy: processing prefetched request body failed"
94
+ " to %s from %s (%s)",
95
+ p_conn->name ? p_conn->name: "",
96
+ c->remote_ip, c->remote_host ? c->remote_host: "");
100
/* Ensure we don't hit a wall where we have a buffer too small
101
* for ap_get_brigade's filters to fetch us another bucket,
102
* surrender once we hit 80 bytes less than MAX_MEM_SPOOL