> Fra: smmarrt [mailto:[EMAIL PROTECTED] 
> Emne: Compression doesn't work :(
> 
> I try setting compression-related properties on Connector, but it 
> doesn't compress anything :(
> 
> <Connector port="8080" maxHttpHeaderSize="8192"
<snip>
>            compression="on" compressionMinSize="2048" />

How did you determine that compression was not being applied?

It would help if you told us what Tomcat level you're using.
Unfortunately, the comments in server.xml appear to be left over from
some past life, so actually reading the documentation is a necessity.
There is no compressionMinSize attribute identified in the 4.1, 5.0, or
5.5 docs (or the code, as far as I can tell); if you're using a level
older than that, you've got other problems to worry about.

For 5.5, the actual description for compression is:

------
The Connector may use HTTP/1.1 GZIP compression in an attempt to save
server bandwidth. The acceptable values for the parameter is "off"
(disable compression), "on" (allow compression, which causes text data
to be compressed), "force" (forces compression in all cases), or a
numerical integer value (which is equivalent to "on", but specifies the
minimum amount of data before the output is compressed). If the
content-length is not known and compression is set to "on" or more
aggressive, the output will also be compressed. If not specified, this
attribute is set to "off".
------

The doc fails to say what the default minimum compression size is, so I
tried compression="force", and all the content now appears properly
garbled in Ethereal.

Also, take a look at compressableMimeType:

------
The value is a comma separated list of MIME types for which HTTP
compression may be used. The default value is
text/html,text/xml,text/plain.
------

Note that trying to compress some static content (e.g., jpg, pdf) is a
waste of time.  

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to