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<[EMAIL PROTECTED]>          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:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to