httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Eckert <>
Subject [users@httpd] mod_proxy_html, HTML rewrite and content compression
Date Wed, 14 Nov 2012 15:53:19 GMT
Hi folks

I'm using apache (2.4.3) as reverse proxy with mod_proxy_html (as 
delivered with 2.4.3) and encountered an issue using HTML rewriting in 
combination with content compression, as with the "Accept-Encoding" and 
"Content-Encoding" HTTP headers.

This issue has been encountered by numerous people and the solution 
presented always comes down to setting the output filters "manually" 
instead of using the mod_proxy_html directive to do it (e.g. see So it boils 
down to setting

         SetOutputFilter INFLATE;proxy-html;DEFLATE
instead of
         ProxyHTMLEnable On

In my test setup this actually solved the problem but it has a side 
effect which I am worried about.

In file modules/filters/mod_proxy_html.c function proxy_html_insert() 
it's clearly visible the xml2enc function is only called if cfg->enabled 
is set - which in turn is set via the ProxyHTMLEnable directive as 
declared with

AP_INIT_FLAG("ProxyHTMLEnable", ap_set_flag_slot,
                  (void*)APR_OFFSETOF(proxy_html_conf, enabled),
                  "Enable proxy-html and xml2enc filters")

I took a look at mod_xml2enc to see if there was a directive which I 
could use to establish the filtering in a way that matches the 
ProxyHTMLEnable directive but I could fine none.

Is there a way to work around this ? I do want the call to mod_xml2enc 
to happen but I also want the reverse proxy to support content compression.

Any suggestions on how to go forward/where to dig on this issue ?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message