]> granicus.if.org Git - apache/commitdiff
mod_ext_filter: don't segfault if content-type is not set.
authorJeff Trawick <trawick@apache.org>
Wed, 10 Jul 2002 11:58:37 +0000 (11:58 +0000)
committerJeff Trawick <trawick@apache.org>
Wed, 10 Jul 2002 11:58:37 +0000 (11:58 +0000)
PR:                        10617
Submitted by:              Arthur P. Smith <apsmith@aps.org>
Reviewed/modified by:      Jeff Trawick

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96003 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/experimental/mod_ext_filter.c

diff --git a/CHANGES b/CHANGES
index 2016dfc53c6f4fd3628270c7114d68eeaa6df6d9..cf116c5de36e7f120a9e691cbcbf11c18193811e 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,8 @@
 Changes with Apache 2.0.40
 
+  *) mod_ext_filter: don't segfault if content-type is not set.  PR 10617.
+     [Arthur P. Smith <apsmith@aps.org>, Jeff Trawick]
+
   *) Fix an error when building ApacheMonitor. 
      [James Cox <imajes@php.net>]
 
index b028ab4300d6203d0de86fa3d0644525d49ef9ea..97bb9bc87e87903c71996f705d5b1a6996f24eaa 100644 (file)
@@ -517,7 +517,8 @@ static apr_status_t init_filter_instance(ap_filter_t *f)
     ctx->p = f->r->pool;
     if (ctx->filter->intype &&
         ctx->filter->intype != INTYPE_ALL &&
-        strcasecmp(ctx->filter->intype, f->r->content_type)) {
+        (!f->r->content_type ||
+         strcasecmp(ctx->filter->intype, f->r->content_type))) {
         /* wrong IMT for us; don't mess with the output */
         ctx->noop = 1;
     }