https://issues.apache.org/bugzilla/show_bug.cgi?id=49328
--- Comment #2 from Ruediger Pluem <[email protected]> 2010-05-23 10:17:30 EDT --- I don't think that your patch is correct. What about filters that expect their init function to be called a second time? The following patch should fix that. Could you please give it a try? Index: modules/filters/mod_filter.c =================================================================== --- modules/filters/mod_filter.c (Revision 947412) +++ modules/filters/mod_filter.c (Arbeitskopie) @@ -100,10 +100,16 @@ { ap_filter_provider_t *p; provider_ctx *pctx; + provider_ctx *pctx_head; int err; ap_filter_rec_t *filter = f->frec; + harness_ctx *fctx = f->ctx; - harness_ctx *fctx = apr_pcalloc(f->r->pool, sizeof(harness_ctx)); + /* Only allocate if not done previously */ + if (!fctx) { + fctx = apr_pcalloc(f->r->pool, sizeof(harness_ctx)); + } + pctx_head = fctx->init_ctx; for (p = filter->providers; p; p = p->next) { if (p->frec->filter_init_func == filter_init) { ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, f->c, @@ -112,6 +118,15 @@ } else if (p->frec->filter_init_func) { f->ctx = NULL; + /* + * Check if we already had a context for this filter and if + * yes restore it. + */ + for (pctx = pctx_head; pctx; pctx = pctx->next) { + if (pctx->provider == p) { + f->ctx = pctx->ctx ; + } + } if ((err = p->frec->filter_init_func(f)) != OK) { ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, f->c, "filter_init for %s failed", p->frec->name); -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
