homepage Welcome to WebmasterWorld Guest from 54.205.144.54
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Tomcat: always do http compression without watch min size
Tomcat: always do http compression without watch min size
wakeup




msg:3091830
 4:39 pm on Sep 21, 2006 (gmt 0)

Hi,

I have an apache tomcat 5.5.17. In my server.xml file I have put

[HTML] <Connector port="8080" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true"
compression="on"
compressionMinSize="2048000"
noCompressionUserAgents="gozilla, traviata"
compressableMimeType="text/html,text/xml,text/plain,application/dime"
/>[/HTML]

But, it always compress the response althought it be less than 1kb.
What do I have to do for set a compresionminsize?

Thanksss

 

DamonHD




msg:3091875
 5:01 pm on Sep 21, 2006 (gmt 0)

Hi,

If you want you can use my (4.x) filter which really does obey the min size that you set (mods obviously remove the link if you wish and put in a note to SM me instead):

[gallery.hd.org...]

In the end I had to play with the code a lot before I trusted it. Note that this also works around a bug (in the JSP spec!) where a filter can be inserted into the data path multiple times, eg on an internal redirect.

Further, this version, using JazzLib, actually has a working flush() so that you can push out partial pages for better responsiveness. This cannot be done with Sun's GZIPOutputStream (yet).

Rgds

Damon

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved