From 329615343c65eb621129954c2c0321a61ba80db6 Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Wed, 8 Jun 2005 08:50:19 +0000 Subject: [PATCH] * modules/generators/mod_cgi.c (cgi_bucket_read): Log a specific error 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 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/generators/mod_cgi.c b/modules/generators/mod_cgi.c index 8c11071f75c..4bac9c3d476 100644 --- a/modules/generators/mod_cgi.c +++ b/modules/generators/mod_cgi.c @@ -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; -- 2.47.2