On Wed, Aug 25, 2004 at 02:40:39PM +0200, Graham Leggett wrote:
> Justin Erenkrantz wrote:
> >Ultimately, all that is needed is a call to ap_set_content_type() before
> >any bytes are written to the client to get AddOutputFilterByType to
> >work. Perhaps with the recent momentum behind mod_proxy work, someone
> >could investigate that and get mod_proxy fixed.
>
> ap_set_content_type() is called on line 769 of proxy_http.c:
But ap_add_output_filters_by_type() explicitly does nothing for a
proxied request. Anyone know why? "AddOutputFilterByType DEFLATE
text/plain text/html" seems to work as expected here for a forward proxy
with this applied: maybe I'm missing something fundamental...
--- server/core.c~ 2004-08-31 09:16:56.000000000 +0100
+++ server/core.c 2004-09-16 16:48:09.000000000 +0100
@@ -2875,11 +2875,10 @@
conf = (core_dir_config *)ap_get_module_config(r->per_dir_config,
&core_module);
- /* We can't do anything with proxy requests, no content-types or if
- * we don't have a filter configured.
+ /* We can't do anything with no content-type or if we don't have a
+ * filter configured.
*/
- if (r->proxyreq != PROXYREQ_NONE || !r->content_type ||
- !conf->ct_output_filters) {
+ if (!r->content_type || !conf->ct_output_filters) {
return;
}