https://issues.apache.org/bugzilla/show_bug.cgi?id=49570
Summary: The CompressionFilter example should support HTTP
proxies to cache gzipped content better by sending
Vary: Accept-Encoding header
Product: Tomcat 7
Version: trunk
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: Examples
AssignedTo: [email protected]
ReportedBy: [email protected]
At the moment the Compression Filter example doesn't send the header "Vary:
Accept-Encoding" with the compressed content (see method writeToGZip(..) in
http://svn.apache.org/repos/asf/tomcat/trunk/webapps/examples/WEB-INF/classes/compressionFilters/CompressionResponseStream.java).
>From many sources like
1. http://httpd.apache.org/docs/2.0/mod/mod_deflate.html#proxies
2. http://developer.yahoo.net/blog/archives/2007/07/high_performanc_3.html
it looks like a "Vary: Accept-Encoding" header should be sent with the
compressed content to make sure proxy servers can serve gzipped content
correctly.
To enhance this example, the method writeToGzip(..) should be updated to send
Vary: Accept-Encoding header like below:
public void writeToGZip(byte b[], int off, int len) throws IOException {
...
response.addHeader("Content-Encoding", "gzip");
response.addHeader("Vary", "Accept-Encoding");
gzipstream = new GZIPOutputStream(output);
...
}
--
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: [email protected]
For additional commands, e-mail: [email protected]