From: Nick Kew Date: Sun, 18 Jun 2006 13:57:54 +0000 (+0000) Subject: Backport fix for PR#39672 (Don't try to insert an undefined filter) X-Git-Tag: 2.2.3~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f32be6d96ea788462a7020d33a0dcc534d226d62;p=thirdparty%2Fapache%2Fhttpd.git Backport fix for PR#39672 (Don't try to insert an undefined filter) and chop outdated blurb. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@415138 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/STATUS b/STATUS index 3a9776f4f2c..ea2af3f444c 100644 --- a/STATUS +++ b/STATUS @@ -76,12 +76,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - * mod_filter: Don't try to insert a filter that doesn't exist - PR#39672 - Trunk version: http://svn.apache.org/viewvc?view=rev&revision=410079 - 2.2.x (identical) - +1: niq, trawick, rpluem - * Worker MPM: On graceless shutdown or restart, send signals to each worker thread to wake them up if they're polling on a Keep-Alive connection. PR 38737. diff --git a/modules/filters/mod_filter.c b/modules/filters/mod_filter.c index 806915e7e32..de88eae3b8e 100644 --- a/modules/filters/mod_filter.c +++ b/modules/filters/mod_filter.c @@ -14,20 +14,6 @@ * limitations under the License. */ -/* Originally contributed by Nick Kew - * - * At the time of writing, this is designed primarily for use with - * httpd 2.2, but is also back-compatible with 2.0. It is likely - * that the 2.0 and 2.2 versions may diverge in future, as additional - * capabilities for 2.2 are added, including updates to util_filter. - * - * 21/9/04: Unifying data structures with util_filter. - * From now on, until and unless we backport, mod_filter requires - * util_filter.h from CVS or httpd-2.1+ to compile. - * There's a minimal patch for httpd-2.0 users maintained by Nick - * to compile mod_filter at http://www.apache.org/~niq/ - */ - #define APR_WANT_STRFUNC #include "apr_want.h" #include "apr_lib.h" @@ -755,6 +741,11 @@ static void filter_insert(request_rec *r) for (p = cfg->chain; p; p = p->next) { filter = apr_hash_get(cfg->live_filters, p->fname, APR_HASH_KEY_STRING); + if (filter == NULL) { + ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, + "Unknown filter %s not added", p->fname); + continue; + } ap_add_output_filter_handle(filter, NULL, r, r->connection); #ifndef NO_PROTOCOL if (ranges && (filter->proto_flags