You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Greg Wilkins <gr...@mortbay.com> on 2002/02/25 01:44:45 UTC
Compression Filter
The CompressionServletResponseWrapper class needs the following methods
added:
> public void setHeader(String name, String value)
> {
> if (!"Content-Length".equalsIgnoreCase(name))
> super.setHeader(name,value);
> }
>
> public void setIntHeader(String name, int value)
> {
> if (!"Content-Length".equalsIgnoreCase(name))
> super.setIntHeader(name,value);
> }
As it is valid for a servlet to set the content-length with a
setHeader call. In fact, for cached, frequently requests resources
it is better to reuse a String value of content-length than to
constantly convert the same length int to a String.
regards
--
Greg Wilkins<gr...@mortbay.com> GB Phone: +44-(0)7092063462
Mort Bay Consulting Australia and UK. Mbl Phone: +61-(0)4 17786631
http://www.mortbay.com AU Phone: +61-(0)2 98107029
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>