mirror of
https://github.com/apache/httpd.git
synced 2025-11-06 16:49:32 +03:00
Handle the case where a brigade might have buckets following the eos
bucket. In this case the cache provider passes all buckets through as is once the cached entry is marked as done. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@996713 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
10
modules/cache/mod_disk_cache.c
vendored
10
modules/cache/mod_disk_cache.c
vendored
@@ -1051,13 +1051,21 @@ static apr_status_t store_body(cache_handle_t *h, request_rec *r,
|
|||||||
|
|
||||||
e = APR_BRIGADE_FIRST(in);
|
e = APR_BRIGADE_FIRST(in);
|
||||||
|
|
||||||
|
/* are we done completely? if so, pass any trailing buckets right through */
|
||||||
|
if (dobj->done) {
|
||||||
|
APR_BUCKET_REMOVE(e);
|
||||||
|
APR_BRIGADE_INSERT_TAIL(out, e);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
/* have we seen eos yet? */
|
/* have we seen eos yet? */
|
||||||
if (APR_BUCKET_IS_EOS(e)) {
|
if (APR_BUCKET_IS_EOS(e)) {
|
||||||
seen_eos = 1;
|
seen_eos = 1;
|
||||||
|
dobj->done = 1;
|
||||||
APR_BUCKET_REMOVE(e);
|
APR_BUCKET_REMOVE(e);
|
||||||
APR_BRIGADE_CONCAT(out, dobj->bb);
|
APR_BRIGADE_CONCAT(out, dobj->bb);
|
||||||
APR_BRIGADE_INSERT_TAIL(out, e);
|
APR_BRIGADE_INSERT_TAIL(out, e);
|
||||||
continue;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* honour flush buckets, we'll get called again */
|
/* honour flush buckets, we'll get called again */
|
||||||
|
|||||||
1
modules/cache/mod_disk_cache.h
vendored
1
modules/cache/mod_disk_cache.h
vendored
@@ -73,6 +73,7 @@ typedef struct disk_cache_object {
|
|||||||
apr_bucket_brigade *bb; /* Set aside brigade */
|
apr_bucket_brigade *bb; /* Set aside brigade */
|
||||||
apr_off_t offset; /* Max size to set aside */
|
apr_off_t offset; /* Max size to set aside */
|
||||||
apr_time_t timeout; /* Max time to set aside */
|
apr_time_t timeout; /* Max time to set aside */
|
||||||
|
int done; /* Is the attempt to cache complete? */
|
||||||
} disk_cache_object_t;
|
} disk_cache_object_t;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user