From 668a5cc2b5d7a2548a6e521e188c6dd909e08f40 Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Wed, 10 Jul 2002 11:58:37 +0000 Subject: [PATCH] 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 --- CHANGES | 3 +++ modules/experimental/mod_ext_filter.c | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) 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; } -- 2.40.0