Changes with Apache 2.0.40
+ *) mod_ext_filter: Ignore any content-type parameters when checking if
+ the response should be filtered. Previously, "intype=text/html"
+ wouldn't match something like "text/html;charset=8859_1".
+ [Jeff Trawick]
+
*) mod_ext_filter: Set up environment variables for external programs.
[Craig Sebenik <craig@netapp.com>]
}
ctx->p = f->r->pool;
if (ctx->filter->intype &&
- ctx->filter->intype != INTYPE_ALL &&
- (!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;
+ ctx->filter->intype != INTYPE_ALL) {
+ if (!f->r->content_type) {
+ ctx->noop = 1;
+ }
+ else {
+ const char *ctypes = f->r->content_type;
+ const char *ctype = ap_getword(f->r->pool, &ctypes, ';');
+
+ if (strcasecmp(ctx->filter->intype, ctype)) {
+ /* wrong IMT for us; don't mess with the output */
+ ctx->noop = 1;
+ }
+ }
}
- else {
+ if (!ctx->noop) {
rv = init_ext_filter_process(f);
if (rv != APR_SUCCESS) {
return rv;
if (dc->debug >= DBGLVL_SHOWOPTIONS) {
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, f->r,
- "%sfiltering `%s' through `%s', cfg %s",
- ctx->noop ? "skipping: " : "",
+ "%sfiltering `%s' of type `%s' through `%s', cfg %s",
+ ctx->noop ? "NOT " : "",
f->r->uri ? f->r->uri : f->r->filename,
+ f->r->content_type ? f->r->content_type : "(unspecified)",
ctx->filter->command,
get_cfg_string(dc, ctx->filter, f->r->pool));
}