svn commit: r1936760 - httpd/httpd/trunk/modules/generators

[email protected] Fri, 31 Jul 2026 11:15:13 -0000
Newsgroups gmane.comp.apache.cvs
Message-ID <178549651326.700399.197651229616955072@svn03-he-fi>
Author: jorton
Date: Fri Jul 31 11:15:13 2026
New Revision: 1936760

Log:
* modules/generators/cgi_common.h (cgi_read_stdout): Log an error
  if the read fails.

PR: 70021
Github: closes #700

Modified:
   httpd/httpd/trunk/modules/generators/cgi_common.h

Modified: httpd/httpd/trunk/modules/generators/cgi_common.h
==============================================================================
--- httpd/httpd/trunk/modules/generators/cgi_common.h	Fri Jul 31 09:39:41 2026	(r1936759)
+++ httpd/httpd/trunk/modules/generators/cgi_common.h	Fri Jul 31 11:15:13 2026	(r1936760)
@@ -312,20 +312,22 @@ static apr_status_t cgi_read_stdout(apr_
 {
     char *buf;
     apr_status_t rv;
+    struct cgi_bucket_data *data = a->data;
 
     *str = NULL;
     *len = APR_BUCKET_BUFF_SIZE;
     buf = apr_bucket_alloc(*len, a->list); /* XXX: check for failure? */
 
     rv = apr_file_read(out, buf, len);
-
     if (rv != APR_SUCCESS && rv != APR_EOF) {
+        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, data->r, APLOGNO(10599)
+                      "failed reading stdout from script %s",
+                      data->r->filename);
         apr_bucket_free(buf);
         return rv;
     }
 
     if (*len > 0) {
-        struct cgi_bucket_data *data = a->data;
         apr_bucket_heap *h;
 
         /* Change the current bucket to refer to what we read */