disk_cache_dir_conf *dconf = ap_get_module_config(r->per_dir_config, &cache_disk_module);
int seen_eos = 0;
- if (!dobj->bb) {
- dobj->bb = apr_brigade_create(r->pool, r->connection->bucket_alloc);
- }
if (!dobj->offset) {
dobj->offset = dconf->readsize;
}
seen_eos = 1;
dobj->done = 1;
APR_BUCKET_REMOVE(e);
- APR_BRIGADE_CONCAT(out, dobj->bb);
APR_BRIGADE_INSERT_TAIL(out, e);
break;
}
/* honour flush buckets, we'll get called again */
if (APR_BUCKET_IS_FLUSH(e)) {
APR_BUCKET_REMOVE(e);
- APR_BRIGADE_CONCAT(out, dobj->bb);
APR_BRIGADE_INSERT_TAIL(out, e);
break;
}
/* metadata buckets are preserved as is */
if (APR_BUCKET_IS_METADATA(e)) {
APR_BUCKET_REMOVE(e);
- APR_BRIGADE_INSERT_TAIL(dobj->bb, e);
+ APR_BRIGADE_INSERT_TAIL(out, e);
continue;
}
/* read the bucket, write to the cache */
rv = apr_bucket_read(e, &str, &length, APR_BLOCK_READ);
APR_BUCKET_REMOVE(e);
- APR_BRIGADE_INSERT_TAIL(dobj->bb, e);
+ APR_BRIGADE_INSERT_TAIL(out, e);
if (rv != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"cache_disk: Error when reading bucket for URL %s",
h->cache_obj->key);
/* Remove the intermediate cache file and return non-APR_SUCCESS */
apr_pool_destroy(dobj->data.pool);
- APR_BRIGADE_CONCAT(out, dobj->bb);
return rv;
}
APR_BUFFERED | APR_EXCL, dobj->data.pool);
if (rv != APR_SUCCESS) {
apr_pool_destroy(dobj->data.pool);
- APR_BRIGADE_CONCAT(out, dobj->bb);
return rv;
}
dobj->file_size = 0;
dobj->data.tempfd);
if (rv != APR_SUCCESS) {
apr_pool_destroy(dobj->data.pool);
- APR_BRIGADE_CONCAT(out, dobj->bb);
return rv;
}
dobj->disk_info.device = finfo.device;
h->cache_obj->key);
/* Remove the intermediate cache file and return non-APR_SUCCESS */
apr_pool_destroy(dobj->data.pool);
- APR_BRIGADE_CONCAT(out, dobj->bb);
return rv;
}
dobj->file_size += written;
h->cache_obj->key, dobj->file_size, dconf->maxfs);
/* Remove the intermediate cache file and return non-APR_SUCCESS */
apr_pool_destroy(dobj->data.pool);
- APR_BRIGADE_CONCAT(out, dobj->bb);
return APR_EGENERAL;
}
dobj->offset -= length;
if (dobj->offset <= 0) {
dobj->offset = 0;
- APR_BRIGADE_CONCAT(out, dobj->bb);
break;
}
if ((dconf->readtime && apr_time_now() > dobj->timeout)) {
dobj->timeout = 0;
- APR_BRIGADE_CONCAT(out, dobj->bb);
break;
}