* modules/generators/cgi_common.h (cgi_bucket_create):
authorJoe Orton <jorton@apache.org>
Wed, 2 Oct 2019 10:41:22 +0000 (10:41 +0000)
committerJoe Orton <jorton@apache.org>
Wed, 2 Oct 2019 10:41:22 +0000 (10:41 +0000)
  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

modules/generators/cgi_common.h
modules/generators/mod_cgi.c

index 69648b1..c60f242 100644 (file)
@@ -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;
index 202d933..f135912 100644 (file)
@@ -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;