Mailing List Archive

svn commit: r1908684 - in /httpd/httpd/trunk: docs/log-message-tags/next-number modules/cache/mod_cache_disk.c
Author: gbechis
Date: Fri Mar 24 08:50:19 2023
New Revision: 1908684

URL: http://svn.apache.org/viewvc?rev=1908684&view=rev
Log:
add error message when storing data to temp file fails.
Github: closes #182

Modified:
httpd/httpd/trunk/docs/log-message-tags/next-number
httpd/httpd/trunk/modules/cache/mod_cache_disk.c

Modified: httpd/httpd/trunk/docs/log-message-tags/next-number
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/log-message-tags/next-number?rev=1908684&r1=1908683&r2=1908684&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/log-message-tags/next-number (original)
+++ httpd/httpd/trunk/docs/log-message-tags/next-number Fri Mar 24 08:50:19 2023
@@ -1 +1 @@
-10413
+10414

Modified: httpd/httpd/trunk/modules/cache/mod_cache_disk.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_cache_disk.c?rev=1908684&r1=1908683&r2=1908684&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/mod_cache_disk.c (original)
+++ httpd/httpd/trunk/modules/cache/mod_cache_disk.c Fri Mar 24 08:50:19 2023
@@ -1033,7 +1033,14 @@ static apr_status_t write_headers(cache_
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) {