Commit 0dc414c3 authored by Joe Orton's avatar Joe Orton
Browse files

* 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
parent 7a7839ae
Loading
Loading
Loading
Loading
+9 −1
Changes for modules/generators/mod_cgi.c: 9 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -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;