You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Michael <sg...@gmx.net> on 2009/04/09 20:54:20 UTC

Gzip compression take 2

Hi folks,

I recently had a discussion with Chuck about, in my opion, the faultly 
gzip compression filter in the Connector. Unfortunately, the discussion 
ended without a solution for the problem.
Basically, Tomcat fails to compress anything else but JSPs regardless 
whether I set compressableMimeType or not.

I am on Tomcat 5.5.27, WinXP SP2. I even scanned through Tomcat code but 
wasn't able to track the problem.

Is anyone able to receive compressed JS or CSS files, which are servered 
from static files?

Thanks,

Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Gzip compression take 2

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Martin Gainty [mailto:mgainty@hotmail.com]
> Subject: RE: Gzip compression take 2
> 
> 
> for chunked encoding specify a connector that supports HTTP 1.1
> protocol ..

All Tomcat HTTP connectors support the 1.1 protocol.

> tut diese Hilfe?

Nein.

 - 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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Gzip compression take 2

Posted by Martin Gainty <mg...@hotmail.com>.
for chunked encoding specify a connector that supports HTTP 1.1 protocol ..
an example from $CATALINA_HOME/conf/server.xml would be:

    <Connector port="8082" 
    debug="5"
    useSendfile="true" 
    useExecutor="true" 
    acceptorThreadCount="1"
    pollerThreadCount="1"
    pollerThreadPriority="java.lang.Thread#NORM_PRIORITY"
    selectorTimeout="1000"
    useComet="true"
    prcessCache="200"
    socket.directBuffer="false"
    socket.rxBufSize="25188"
    socket.txBufSize="43800"
    socket.appReadBufSize="8192"
    socket.appWriteBufSize="8192"
    socket.bufferPool="500"
    socket.bufferPoolSize="100000000"
    socket.processorCache="500"
    socket.keyCache="500"
    socket.eventCache="500"
    socket.tcpNoDelay="false"
    socket.soKeepAlive="true"
    socket.soTimeout="5000"
    protocol="org.apache.coyote.http11.Http11NioProtocol" 
    maxThreads="150" 
    connectionTimeout="60000" 
    redirectPort="8443" />

tut diese Hilfe?
Martin 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung / Note de déni et de confidentialité 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.






> Date: Thu, 9 Apr 2009 22:38:37 +0200
> From: sgfan@gmx.net
> Subject: Re: Gzip compression take 2
> To: users@tomcat.apache.org
> 
> > sgfan@gmx.net wrote:
> > >> This is working for me with 5.5.27 :
> > >>
> > >>      <Connector
> > >>          port="80"
> > >>          redirectPort="443"
> > >>          debug="0"
> > >>          connectionTimeout="20000"
> > >> 	compressableMimeType="text/css,text/javascript"
> > >> 	maxPostSize="10485760"
> > >> 	>
> > >>      </Connector>
> > > 
> > >  there is no compression="on", did I miss something?
> > 
> > You're right. I didn't copy this from my running configuration and the 
> > file was mission that.
> 
> Does Tomcat respond with Transfer-Encoding chunked and Content-Encoding gzip?
> 
> I also tried compressableMimeType="text/javascript" only, failed von FF3, IE6 and Fiddler. As if I am doing something completely wrong.
> 
> Mike
> -- 
> Neu: GMX FreeDSL Komplettanschluss mit DSL 6.000 Flatrate + Telefonanschluss für nur 17,95 Euro/mtl.!* http://dslspecial.gmx.de/freedsl-surfflat/?ac=OM.AD.PD003K11308T4569a
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 

_________________________________________________________________
Rediscover Hotmail®: Now available on your iPhone or BlackBerry
http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Mobile1_042009

Re: Gzip compression take 2

Posted by sg...@gmx.net.
> sgfan@gmx.net wrote:
> >> This is working for me with 5.5.27 :
> >>
> >>      <Connector
> >>          port="80"
> >>          redirectPort="443"
> >>          debug="0"
> >>          connectionTimeout="20000"
> >> 	compressableMimeType="text/css,text/javascript"
> >> 	maxPostSize="10485760"
> >> 	>
> >>      </Connector>
> > 
> >  there is no compression="on", did I miss something?
> 
> You're right. I didn't copy this from my running configuration and the 
> file was mission that.

Does Tomcat respond with Transfer-Encoding chunked and Content-Encoding gzip?

I also tried compressableMimeType="text/javascript" only, failed von FF3, IE6 and Fiddler. As if I am doing something completely wrong.

Mike
-- 
Neu: GMX FreeDSL Komplettanschluss mit DSL 6.000 Flatrate + Telefonanschluss für nur 17,95 Euro/mtl.!* http://dslspecial.gmx.de/freedsl-surfflat/?ac=OM.AD.PD003K11308T4569a

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Gzip compression take 2

Posted by George Sexton <gs...@mhsoftware.com>.

George Sexton wrote:
> 
> 
> sgfan@gmx.net wrote:
>>> This is working for me with 5.5.27 :
>>>
>>>      <Connector
>>>          port="80"
>>>          redirectPort="443"
>>>          debug="0"
>>>          connectionTimeout="20000"
>>>     compressableMimeType="text/css,text/javascript"
>>>     maxPostSize="10485760"
>>>     >
>>>      </Connector>
>>
>>  there is no compression="on", did I miss something?
> 
> You're right. I didn't copy this from my running configuration and the 
> file was mission that.
> 


I'm having a day. "Missing".


-- 
George Sexton
MH Software, Inc.
Voice: +1 303 438 9585
URL:   http://www.mhsoftware.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Gzip compression take 2

Posted by George Sexton <gs...@mhsoftware.com>.

sgfan@gmx.net wrote:
>> This is working for me with 5.5.27 :
>>
>>      <Connector
>>          port="80"
>>          redirectPort="443"
>>          debug="0"
>>          connectionTimeout="20000"
>> 	compressableMimeType="text/css,text/javascript"
>> 	maxPostSize="10485760"
>> 	>
>>      </Connector>
> 
>  there is no compression="on", did I miss something?

You're right. I didn't copy this from my running configuration and the 
file was mission that.

-- 
George Sexton
MH Software, Inc.
Voice: +1 303 438 9585
URL:   http://www.mhsoftware.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Gzip compression take 2

Posted by sg...@gmx.net.
> This is working for me with 5.5.27 :
> 
>      <Connector
>          port="80"
>          redirectPort="443"
>          debug="0"
>          connectionTimeout="20000"
> 	compressableMimeType="text/css,text/javascript"
> 	maxPostSize="10485760"
> 	>
>      </Connector>

 there is no compression="on", did I miss something?
-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Gzip compression take 2

Posted by George Sexton <gs...@mhsoftware.com>.
This is working for me with 5.5.27 :

     <Connector
         port="80"
         redirectPort="443"
         debug="0"
         connectionTimeout="20000"
	compressableMimeType="text/css,text/javascript"
	maxPostSize="10485760"
	>
     </Connector>



Michael wrote:
> Hi folks,
> 
> I recently had a discussion with Chuck about, in my opion, the faultly 
> gzip compression filter in the Connector. Unfortunately, the discussion 
> ended without a solution for the problem.
> Basically, Tomcat fails to compress anything else but JSPs regardless 
> whether I set compressableMimeType or not.
> 
> I am on Tomcat 5.5.27, WinXP SP2. I even scanned through Tomcat code but 
> wasn't able to track the problem.
> 
> Is anyone able to receive compressed JS or CSS files, which are servered 
> from static files?
> 
> Thanks,
> 
> Mike
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 

-- 
George Sexton
MH Software, Inc.
Voice: +1 303 438 9585
URL:   http://www.mhsoftware.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Gzip compression take 2

Posted by Michael <sg...@gmx.net>.
Bill Barker wrote:
> By any chance are you using the APR connector?  If so, it will use sendfile 
> (unless explicitly disabled) for large static files which bypasses the 
> connector compression logic.

Bill,

you are a genius. I do have the APR connector running and use sendfile 
was the real issue here.

Thank you so much!

Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Gzip compression take 2

Posted by Bill Barker <wb...@wilshire.com>.
By any chance are you using the APR connector?  If so, it will use sendfile 
(unless explicitly disabled) for large static files which bypasses the 
connector compression logic.

"Michael" <sg...@gmx.net> wrote in message news:49DE445C.3050909@gmx.net...
> Hi folks,
>
> I recently had a discussion with Chuck about, in my opion, the faultly 
> gzip compression filter in the Connector. Unfortunately, the discussion 
> ended without a solution for the problem.
> Basically, Tomcat fails to compress anything else but JSPs regardless 
> whether I set compressableMimeType or not.
>
> I am on Tomcat 5.5.27, WinXP SP2. I even scanned through Tomcat code but 
> wasn't able to track the problem.
>
> Is anyone able to receive compressed JS or CSS files, which are servered 
> from static files?
>
> Thanks,
>
> Mike 




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org