tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 49570] The CompressionFilter example should support HTTP proxies to cache gzipped content better by sending Vary: Accept-Encoding header
Date Tue, 13 Jul 2010 03:39:16 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=49570

--- Comment #2 from Thai Ha <hathanhthai@gmail.com> 2010-07-12 23:39:11 EDT ---
The patch in SVN doesn't work for me because there is no method
HttpServletResponse.getHeader()


protected HttpServletResponse response = null;
....
response.addHeader("Content-Encoding", "gzip");
String vary = response.getHeader("Vary");
if (vary == null) {
    // Add a new Vary header
    response.setHeader("Vary", "Accept-Encoding");
} else if (vary.equals("*")) {
    // No action required
} else {
    // Merge into current header
    response.setHeader("Vary", vary + ",Accept-Encoding");
}

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message