You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ian Holsman <Ia...@apache.org> on 2003/07/18 19:01:19 UTC

AddOutputByType and the proxy

hey guys.
I'm trying to add the DEFALTE filter like this

Addoutputbytype DEFLATE text/html

and it works spiffy for most things.

except for reverse-proxied stuff

now before I go patching things, I was wondering if this was desired 
behavior..

I'm thinking that it should be changed way down in 
ap_add_output_filters_by_type

does anyone know why we change for if the request is proxied in this 
function? (server/core.c)

and would this patch break anything ?

Index: core.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/core.c,v
retrieving revision 1.239
diff -u -r1.239 core.c
--- core.c      20 Jun 2003 12:53:52 -0000      1.239
+++ core.c      18 Jul 2003 16:59:15 -0000
@@ -2801,11 +2801,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 can't do anything with no content-types 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;
     }





Re: AddOutputByType and the proxy

Posted by Graham Leggett <mi...@sharp.fm>.
Ian Holsman wrote:

> I'm trying to add the DEFALTE filter like this
> 
> Addoutputbytype DEFLATE text/html
> 
> and it works spiffy for most things.
> 
> except for reverse-proxied stuff
> 
> now before I go patching things, I was wondering if this was desired 
> behavior..

I doubt it - I think it would be really useful for a reverse proxy to be 
able to apply a deflate encoding where the backend server can't or is 
too expensive to do it.

Regards,
Graham
-- 
-----------------------------------------
minfrin@sharp.fm		"There's a moon
					over Bourbon Street
						tonight..."