Mantis - Resin
Viewing Issue Advanced Details
2608 major always 04-16-08 06:16 04-21-08 10:27
azenkov  
ferg  
urgent  
closed 3.1.5  
fixed  
none    
none 3.1.6  
0002608: GZip filter messes up http headers
The problem is in logic of caucho GZip filter which sets http headers.
1. It sets Vary header on those requests which it shouldn't touch according to <allow-content-type> configuration. Which is just a bug I believe. Simply speaking if you restrict gzip filter by content type and map it to all requests every single request will get Vary not just these which were gziped. This bug makes impossible to fine tune gzip filter.
2. If you disable Vary for gzip filter with use-vary parameter for some reason it sets Cache-control: private header which is not related to Vary header. Already set Cache-control: private in its turn doesn't allow resin cache mappings to set proper expiration on static resources.
Please let me know if I should post those 2 as separate issues but I think they worth fixing in a batch.

Notes
(0002997)
sam   
04-18-08 09:09   
For 2), Resin set's the Cache-control: private if
use-vary=false because otherwise browsers that do not accept gzip could
get a gzipped response served to them out of the cache.

use-vary is a bit of a legacy configuration, it is intended to
workaround an IE bug that causes IE to never cache responses that set
the Vary header.

A better way to solve that issue is to use rewrite-vary-as-private=true
in the <cache> configuration. That way the gzipped response is still
stored in Resin's proxy cache, and browsers will get Cache-Control: private
instead of Vary: Accept-Encoding

More informatrion about the IE problem with Vary is here:
http://bugs.caucho.com/view.php?id=1581 [^]

Documentation for rewrite-vary-as-private is here:
http://www.caucho.com/resin/doc/cluster-tags.xtp#cache [^]
(0002999)
ferg   
04-21-08 10:27   
server/183q