]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* modules/generators/cgi_common.h (cgi_read_stdout): Log an error trunk trunk
authorJoe Orton <jorton@apache.org>
Fri, 31 Jul 2026 11:15:13 +0000 (11:15 +0000)
committerJoe Orton <jorton@apache.org>
Fri, 31 Jul 2026 11:15:13 +0000 (11:15 +0000)
  if the read fails.

PR: 70021
Github: closes #700

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1936760 13f79535-47bb-0310-9956-ffa450edef68

modules/generators/cgi_common.h

index 9bf08a58e911bb919945c165c82894eb294e1ac7..54d6c8b8521673e57a97371183124088c510d587 100644 (file)
@@ -312,20 +312,22 @@ static apr_status_t cgi_read_stdout(apr_bucket *a, apr_file_t *out,
 {
     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 */