The following patch should fix PR37145. I would like to hear some comments /
thoughts
from brigade / buckets and proxy gurus on this.
Although this problem has been reported against 2.0.55, I cross checked
and this problem is also in the trunk.
Regards
RĂ¼diger
Index: modules/proxy/proxy_http.c
===================================================================
--- modules/proxy/proxy_http.c (Revision 312938)
+++ modules/proxy/proxy_http.c (Arbeitskopie)
@@ -1080,6 +1080,18 @@
return status;
}
+ /*
+ * setaside the buckets of temp_brigade before concating input_brigade
+ * with temp_brigade. (At least) in the SSL case temp_brigade contains
+ * transient buckets whose data get overwritten during the next call
+ * of ap_get_brigade in the loop.
+ */
+ for (e = APR_BRIGADE_FIRST(temp_brigade);
+ e != APR_BRIGADE_SENTINEL(temp_brigade);
+ e = APR_BUCKET_NEXT(e)) {
+ apr_bucket_setaside(e, p);
+ }
+
apr_brigade_length(temp_brigade, 1, &bytes);
APR_BRIGADE_CONCAT(input_brigade, temp_brigade);
bytes_read += bytes;