]> granicus.if.org Git - apache/commitdiff
* modules/generators/mod_cgi.c (cgi_bucket_read): Log a specific error
authorJoe Orton <jorton@apache.org>
Wed, 8 Jun 2005 08:50:19 +0000 (08:50 +0000)
committerJoe Orton <jorton@apache.org>
Wed, 8 Jun 2005 08:50:19 +0000 (08:50 +0000)
if a timeout occurs from a blocking read; more helpful than a generic
"apr_bucket_read failed" error from some higher-up filter.

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

modules/generators/mod_cgi.c

index 8c11071f75c73019c4c3e8be33a31d3606a1b87a..4bac9c3d476ab471acf589f676816646efe12487 100644 (file)
@@ -678,7 +678,15 @@ static apr_status_t cgi_bucket_read(apr_bucket *b, const char **str,
 
         rv = apr_pollset_poll(data->pollset, timeout, &num, &results);
         if (APR_STATUS_IS_TIMEUP(rv)) {
-            return timeout == 0 ? APR_EAGAIN : rv;
+            if (timeout) {
+                ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, data->r,
+                              "Timeout waiting for output from CGI script %s",
+                              data->r->filename);
+                return rv;
+            }
+            else {
+                return APR_EAGAIN;
+            }
         }
         else if (APR_STATUS_IS_EINTR(rv)) {
             continue;