]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Backport fix for PR#39672 (Don't try to insert an undefined filter)
authorNick Kew <niq@apache.org>
Sun, 18 Jun 2006 13:57:54 +0000 (13:57 +0000)
committerNick Kew <niq@apache.org>
Sun, 18 Jun 2006 13:57:54 +0000 (13:57 +0000)
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

STATUS
modules/filters/mod_filter.c

diff --git a/STATUS b/STATUS
index 3a9776f4f2c39ff350681d1fb870aec1582371e5..ea2af3f444c3ce75b6067752cc052685d2113073 100644 (file)
--- 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.
index 806915e7e324c55f0c96185256ab0e8108085818..de88eae3b8e5e9d99106c34eecfe7b69c3a04291 100644 (file)
  * limitations under the License.
  */
 
-/* Originally contributed by Nick Kew <nick webthing.com>
- *
- * 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