From: Joe Orton Date: Wed, 8 Jun 2005 08:50:19 +0000 (+0000) Subject: * modules/generators/mod_cgi.c (cgi_bucket_read): Log a specific error X-Git-Tag: 2.1.5~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=329615343c65eb621129954c2c0321a61ba80db6;p=thirdparty%2Fapache%2Fhttpd.git * 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 --- 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;