> The essential feature of this patch is that > ap_add_output_filters_by_type() is called out > of the ap_http_header_filter.
You can't solve this problem this way. The problem here, is that the first time down the filter stack, the data won't go through the correct filters. Think of what would happen if you had CGI script that output text/html, and you had AddOutputFiltersByType INCLUDES text/html. With this patch, it would be possible to miss SSI tags in the first chunk of data. The only way to do this, is to have a filter at the end of the RESOURCE and CONTENT_SET filter stacks. That filter would add more filters, and then move itself to below those new filters to check if the content-type has changed. Ryan