immediately after are used so that memory consumption is not
proportional to the size of the response.
PR: 29318
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103810
13f79535-47bb-0310-9956-
ffa450edef68
ctx->stream.avail_out = c->bufferSize;
}
- for (e = APR_BRIGADE_FIRST(bb);
- e != APR_BRIGADE_SENTINEL(bb);
- e = APR_BUCKET_NEXT(e))
+ while (!APR_BRIGADE_EMPTY(bb))
{
const char *data;
apr_bucket *b;
apr_size_t len;
-
int done = 0;
+ e = APR_BRIGADE_FIRST(bb);
+
if (APR_BUCKET_IS_EOS(e)) {
char *buf;
unsigned int deflate_len;
if (APR_BUCKET_IS_FLUSH(e)) {
apr_bucket *bkt;
apr_status_t rv;
+
+ apr_bucket_delete(e);
+
if (ctx->stream.avail_in > 0) {
zRC = deflate(&(ctx->stream), Z_SYNC_FLUSH);
if (zRC != Z_OK) {
if (zRC != Z_OK)
return APR_EGENERAL;
}
+
+ apr_bucket_delete(e);
}
apr_brigade_cleanup(bb);