From: Joe Orton Date: Wed, 2 Oct 2019 10:41:22 +0000 (+0000) Subject: * modules/generators/cgi_common.h (cgi_bucket_create): X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=58b69a442e0cf259c337ec9d4a675a289ff1b6fe;p=apache * modules/generators/cgi_common.h (cgi_bucket_create): Disable APR timeout handling here for all callers. * modules/generators/mod_cgi.c (cgi_handler): ... drop it here. PR: 63797 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1867882 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/generators/cgi_common.h b/modules/generators/cgi_common.h index 69648b1bf9..c60f24289b 100644 --- a/modules/generators/cgi_common.h +++ b/modules/generators/cgi_common.h @@ -49,6 +49,10 @@ static apr_bucket *cgi_bucket_create(request_rec *r, apr_pollfd_t fd; struct cgi_bucket_data *data = apr_palloc(r->pool, sizeof *data); + /* Disable APR timeout handling since we'll use poll() entirely. */ + apr_file_pipe_timeout_set(out, 0); + apr_file_pipe_timeout_set(err, 0); + APR_BUCKET_INIT(b); b->free = apr_bucket_free; b->list = list; diff --git a/modules/generators/mod_cgi.c b/modules/generators/mod_cgi.c index 202d933668..f135912162 100644 --- a/modules/generators/mod_cgi.c +++ b/modules/generators/mod_cgi.c @@ -772,9 +772,6 @@ static int cgi_handler(request_rec *r) AP_DEBUG_ASSERT(script_in != NULL); #if APR_FILES_AS_SOCKETS - apr_file_pipe_timeout_set(script_in, 0); - apr_file_pipe_timeout_set(script_err, 0); - b = cgi_bucket_create(r, dc->timeout, script_in, script_err, c->bucket_alloc); if (b == NULL) return HTTP_INTERNAL_SERVER_ERROR;