Hello! I've had a challenge with mod_perl and mod_xslt under Apache2, the problem is:
mod_xslt collects buckets from mod_perl for further processing. When mod_xslt got EOS bucket processing occurs, but some data in buckets appear to be corrupted. After few hours with various server configurations, gdb and other fun stuff, I've found a clue. At least it works for me. --- patch --- *** modperl_filter.c.orig Tue May 18 17:37:34 2004 --- modperl_filter.c Tue May 18 17:38:06 2004 *************** MP_INLINE apr_status_t modperl_wbucket_p *** 127,132 **** --- 127,133 ---- apr_bucket_alloc_t *ba = (*wb->filters)->c->bucket_alloc; apr_bucket_brigade *bb; apr_bucket *bucket; + char *copy; /* reset the counter to 0 as early as possible and in one place, * since this function will always either pass the data out (and *************** MP_INLINE apr_status_t modperl_wbucket_p *** 165,171 **** } bb = apr_brigade_create(wb->pool, ba); ! bucket = apr_bucket_transient_create(buf, len, ba); APR_BRIGADE_INSERT_TAIL(bb, bucket); if (add_flush_bucket) { --- 166,173 ---- } bb = apr_brigade_create(wb->pool, ba); ! copy = apr_pmemdup(wb->pool, buf, len); ! bucket = apr_bucket_transient_create(copy, len, ba); APR_BRIGADE_INSERT_TAIL(bb, bucket); if (add_flush_bucket) { ------------------------------------------------------------------------ ------------ Best regards, /grig P.S. mod_xslt-2.0.4 mod_perl-1.99.13 apache-2.0.49 -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html