From: Jeff Trawick Date: Wed, 10 Jul 2002 11:58:37 +0000 (+0000) Subject: mod_ext_filter: don't segfault if content-type is not set. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=56d943fe4930226f7cac9b5c0c529b8323adb097;p=apache mod_ext_filter: don't segfault if content-type is not set. PR: 10617 Submitted by: Arthur P. Smith Reviewed/modified by: Jeff Trawick git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96003 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 2016dfc53c..cf116c5de3 100644 --- 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 , Jeff Trawick] + *) Fix an error when building ApacheMonitor. [James Cox ] diff --git a/modules/experimental/mod_ext_filter.c b/modules/experimental/mod_ext_filter.c index b028ab4300..97bb9bc87e 100644 --- a/modules/experimental/mod_ext_filter.c +++ b/modules/experimental/mod_ext_filter.c @@ -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; }