httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Akins <>
Subject [PATCH] setenvif filter
Date Tue, 23 May 2006 15:10:00 GMT
This patch add a filter to mod_setenvif that lets it match against 
response headers as well as request headers.  It is probably a horrible 
implementation, but submitted to encourage others to think of the idea.

This changes the configuration to allow another optional field to 
designate the "mode" of the match (default is request)

SetEnvIf response Content-Type text/* is_text=1

will match against the response header content-type.

The main purpose of this is to allow configurations such as:

AddOutputFilterByType DEFLATE text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
SetEnvIf response Content-Type text/html user-agent-vary=1
Header append Vary User-Agent env=user-agent-vary

With this patch, the correct vary headers are added in a reverse proxy 

most of the code was adapted from mod_headers.


Brian Akins
Lead Systems Engineer
CNN Internet Technologies

View raw message