From 54dc286b091d6542c61436a12fcb6e989f6900cc Mon Sep 17 00:00:00 2001 From: Eric Covener Date: Wed, 3 Oct 2007 17:17:24 +0000 Subject: [PATCH] mod_ext_filter: Prevent a hang on Windows when the filter input data is pipelined PR 29901 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@581660 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 4 ++++ modules/filters/mod_ext_filter.c | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/CHANGES b/CHANGES index 76e732d01a..5aa1d332a6 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,10 @@ Changes with Apache 2.3.0 [ When backported to 2.2.x, remove entry from this file ] + *) mod_ext_filter: Prevent a hang on Windows when the filter + input data is pipelined. + PR 29901 [Eric Covener] + *) mod_deflate: Don't leave a strong ETag in place while transforming the entity. PR 39727 [Nick Kew] diff --git a/modules/filters/mod_ext_filter.c b/modules/filters/mod_ext_filter.c index 78c9f90d5e..e328ee4780 100644 --- a/modules/filters/mod_ext_filter.c +++ b/modules/filters/mod_ext_filter.c @@ -485,6 +485,14 @@ static apr_status_t init_ext_filter_process(ap_filter_t *f) return rc; } + rc = apr_file_pipe_timeout_set(ctx->proc->out, 0); + if (rc != APR_SUCCESS) { + ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, f->r, + "couldn't set child stdin pipe timeout to 0 for filter %s ", + ctx->filter->name); + return rc; + } + apr_pool_note_subprocess(ctx->p, ctx->proc, APR_KILL_AFTER_TIMEOUT); /* We don't want the handle to the child's stdin inherited by any -- 2.40.0