summaryrefslogtreecommitdiffstats
path: root/modules/cache/mod_cache_disk.c
diff options
context:
space:
mode:
authorGiovanni Bechis <gbechis@apache.org>2023-03-24 09:50:19 +0100
committerGiovanni Bechis <gbechis@apache.org>2023-03-24 09:50:19 +0100
commit56745ba205f51eca713f4a3b3dcd1fd16103bb3f (patch)
treeda26e619027fee4ccd9d12a6b183c343a9a0a073 /modules/cache/mod_cache_disk.c
parentcheck apreq_cookie_make return value (diff)
downloadapache2-56745ba205f51eca713f4a3b3dcd1fd16103bb3f.tar.xz
apache2-56745ba205f51eca713f4a3b3dcd1fd16103bb3f.zip
add error message when storing data to temp file fails.
Github: closes #182 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1908684 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/cache/mod_cache_disk.c')
-rw-r--r--modules/cache/mod_cache_disk.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/cache/mod_cache_disk.c b/modules/cache/mod_cache_disk.c
index 8d17a195f3..ecc037867a 100644
--- a/modules/cache/mod_cache_disk.c
+++ b/modules/cache/mod_cache_disk.c
@@ -1033,7 +1033,14 @@ static apr_status_t write_headers(cache_handle_t *h, request_rec *r)
varray = apr_array_make(r->pool, 6, sizeof(char*));
tokens_to_array(r->pool, tmp, varray);
- store_array(dobj->vary.tempfd, varray);
+ rv = store_array(dobj->vary.tempfd, varray);
+ if (rv != APR_SUCCESS) {
+ ap_log_rerror(APLOG_MARK, APLOG_WARNING, rv, r, APLOGNO(10413)
+ "could not write to vary file %s",
+ dobj->vary.tempfile);
+ apr_pool_destroy(dobj->vary.pool);
+ return rv;
+ }
rv = apr_file_close(dobj->vary.tempfd);
if (rv != APR_SUCCESS) {