Any idea folks on this issue?

From: Bhattacharya, Sudip [mailto:sudip.bhattacha...@genpact.com]
Sent: Wednesday, October 10, 2012 1:45 AM
To: users@httpd.apache.org
Subject: [users@httpd] How to Enable/Disable mod_deflate compression basis 
custom request headers

Hi friends,

I have the following setup.
- Java application on WebLogic server sitting behind Apache Web Server in US.
- 2nd Apache as Caching Proxy setup in Europe to do local caching for Europe 
users. This is proxying to the US apache server (not directly to weblogic).

Now, I have some JSPs which are sending uncompressed output from weblogic.
I want to enable mod_deflate for these JSPs, but with the following condition:
--Compressed JSP output should be served only on requests coming from the 
Europe apache server.
--I don't want compression when the request is coming directly to the US apache 
server.
The reason behind this, is that I want to do a side by side comparison of the 
performance when an Europe user hits the US apache directly, vs when they come 
via the Europe proxy.

I have added the following custom request header in the Europe Apache 
configuration.
RequestHeader set RemoteUser "yes"

I want to enable compression on JSP output only when this RequestHeader is in 
the request, and I want to do this in the US apache server, so that the data 
transmission from US to Europe is compressed.

Can you guide me on how to do this?
How can I check for a custom request header in the request and then 
conditionally enable gzip compression for specific extension/mime-types?

Regards,
Sudip Kumar Bhattacharya




This e-mail (and any attachments), is confidential and may be privileged. It 
may be read, copied and used only

by intended recipients. Unauthorized access to this e-mail (or attachments) and 
disclosure or copying of its

contents or any action taken in reliance on it is unlawful. Unintended 
recipients must notify the sender immediately

by e-mail/phone & delete it from their system without making any copies or 
disclosing it to a third person.



This e-mail (and any attachments), is confidential and may be privileged. It 
may be read, copied and used only
by intended recipients. Unauthorized access to this e-mail (or attachments) and 
disclosure or copying of its 
contents or any action taken in reliance on it is unlawful. Unintended 
recipients must notify the sender immediately 
by e-mail/phone & delete it from their system without making any copies or 
disclosing it to a third person.

Reply via email to