I am using jetty9.2.6. The site has ran for months without issue on the
Jetty 9.2.x codes bases. I decided to audit the site to see if there were
things we could do to make it more efficient. One of those things was
enabling gzip. So I added the gzip filter to to my webdefault.xml file.
<filter> <filter-name>GzipFilter</filter-name>
<filter-class>org.eclipse.jetty.servlets.GzipFilter</filter-class> <!--
<init-param> <param-name>mimeTypes</param-name>
<param-value>text/html,text/css,text/plain,text/xml,application/javascript;
charset=UTF-8</param-value> </init-param> --> </filter> <filter-mapping>
<filter-name>GzipFilter</filter-name> <url-pattern>/*</url-pattern>
</filter-mapping>
I commented out the mineType filter while trying to get the gzip filter to
actually gzip some content.
I turned on logging level to debug and can see the gzip filter in the chain
but non of the content is gzipped.
*Is there something else one must do to see content gzip'ed?*
I can see these response header:
*ETag: W/"KDA/WLVskAIKDA+EGdn958--gzip"*
*Vary: Accept-Encoding, User-Agent*
*Here is an example from the debug logs:*
2015-01-11 08:48:43.671:DBUG:oejs.HttpChannel:qtp832947102-22:
HttpChannelOverHttp@69d1e22d{r=1,c=false,a=IDLE,uri=-} handle enter
2015-01-11 08:48:43.671:DBUG:oejs.HttpChannelState:qtp832947102-22 -
/modular/module2.js: HttpChannelState@563202b8{s=IDLE i=true a=null}
handling IDLE
2015-01-11 08:48:43.671:DBUG:oejs.HttpChannel:qtp832947102-22 -
/modular/module2.js:
HttpChannelOverHttp@69d1e22d{r=1,c=false,a=DISPATCHED,uri=/modular/module2.js}
action REQUEST_DISPATCH
2015-01-11 08:48:43.672:DBUG:oejs.Server:qtp832947102-22 -
/modular/module2.js: REQUEST GET /modular/module2.js on
HttpChannelOverHttp@69d1e22d
{r=1,c=false,a=DISPATCHED,uri=/modular/module2.js}
2015-01-11 08:48:43.672:DBUG:oejsh.ContextHandler:qtp832947102-22 -
/modular/module2.js:http://192.168.254.212:80/modular/module2.js: scope
null||/modular/module2.js @ o.e.j.w.WebAppContext@5c18298f
{/,file:/D:/siteBench/,AVAILABLE,bench.local}{file:/D:/siteBench/}
2015-01-11 08:48:43.672:DBUG:oejsh.ContextHandler:qtp832947102-22 -
/modular/module2.js:http://192.168.254.212:80/modular/module2.js:
context=||/modular/module2.js @ o.e.j.w.WebAppContext@5c18298f
{/,file:/D:/siteBench/,AVAILABLE,bench.local}{file:/D:/siteBench/}
2015-01-11 08:48:43.672:DBUG:oejs.session:qtp832947102-22 -
/modular/module2.js:http://192.168.254.212:80/modular/module2.js:
sessionManager=org.eclipse.jetty.server.session.HashSessionManager@27d415d9
2015-01-11 08:48:43.672:DBUG:oejs.session:qtp832947102-22 -
/modular/module2.js:http://192.168.254.212:80/modular/module2.js:
session=null
2015-01-11 08:48:43.672:DBUG:oejs.ServletHandler:qtp832947102-22 -
/modular/module2.js:http://192.168.254.212:80/modular/module2.js: servlet
|/modular/module2.js|null -> default@5c13d641
==org.eclipse.jetty.servlet.DefaultServlet,0,true
2015-01-11 08:48:43.672:DBUG:oejs.ServletHandler:qtp832947102-22 -
/modular/module2.js:http://192.168.254.212:80/modular/module2.js:
chain=GzipFilter->default@5c13d641
==org.eclipse.jetty.servlet.DefaultServlet,0,true
2015-01-11 08:48:43.672:DBUG:oejs.ServletHandler:qtp832947102-22 -
/modular/module2.js:http://192.168.254.212:80/modular/module2.js: call
filter GzipFilter
2015-01-11 08:48:43.672:DBUG:oejs.ServletHandler:qtp832947102-22 -
/modular/module2.js:http://192.168.254.212:80/modular/module2.js: call
servlet default@5c13d641==org.eclipse.jetty.servlet.DefaultServlet,0,true
2015-01-11 08:48:43.673:DBUG:oejs.DefaultServlet:qtp832947102-22 -
/modular/module2.js:http://192.168.254.212:80/modular/module2.js: Resource
/modular/module2.js.gz=file:/D:/siteBench/modular/module2.js.gz
2015-01-11 08:48:43.673:DBUG:oejs.DefaultServlet:qtp832947102-22 -
/modular/module2.js:http://192.168.254.212:80/modular/module2.js:
uri=/modular/module2.js, resource=file:/D:/siteBench/modular/module2.js,
content=CachedContent@701e5ed8{r=file:/D:/siteBench/modular/module2.js,e=true,lm=Sat,
10 Jan 2015 04:12:31 GMT,ct=java.nio.HeapByteBuffer[pos=0 lim=22 cap=22]}
2015-01-11 08:48:43.673:DBUG:oejs.DefaultServlet:qtp832947102-22 -
/modular/module2.js:http://192.168.254.212:80/modular/module2.js: sendData
content=CachedContent@701e5ed8{r=file:/D:/siteBench/modular/module2.js,e=true,lm=Sat,
10 Jan 2015 04:12:31 GMT,ct=java.nio.HeapByteBuffer[pos=0 lim=22 cap=22]}
out=org.eclipse.jetty.servlets.GzipFilter$1$1@51c492c6 async=false
2015-01-11 08:48:43.675:DBUG:oejs.HttpConnection:qtp832947102-22 -
/modular/module2.js:http://192.168.254.212:80/modular/module2.js:
org.eclipse.jetty.server.HttpConnection$SendCallback@7389d67c[PROCESSING][i=ResponseInfo{HTTP/1.1
200
null,-1,false},cb=org.eclipse.jetty.server.HttpChannel$CommitCallback@661c96b9]
generate: NEED_HEADER (null,[p=0,l=566,c=32768,r=566],true)@START
2015-01-11 08:48:43.675:DBUG:oejs.HttpConnection:qtp832947102-22 -
/modular/module2.js:http://192.168.254.212:80/modular/module2.js:
org.eclipse.jetty.server.HttpConnection$SendCallback@7389d67c[PROCESSING][i=ResponseInfo{HTTP/1.1
200
null,-1,false},cb=org.eclipse.jetty.server.HttpChannel$CommitCallback@661c96b9]
generate: FLUSH
([p=0,l=350,c=8192,r=350],[p=0,l=566,c=32768,r=566],true)@COMPLETING
2015-01-11 08:48:43.675:DBUG:oeji.WriteFlusher:qtp832947102-22 -
/modular/module2.js:http://192.168.254.212:80/modular/module2.js: write:
WriteFlusher@3f672bd6{IDLE}
[HeapByteBuffer@f8258014[p=0,l=350,c=8192,r=350]={<<<HTTP/1.1
200 OK\r\n....v20141205)\r\n\r\n>>>h:
W/"KDA/WLWIXkY...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00},HeapByteBuffer@f0607083
[p=0,l=566,c=32768,r=566]={<<<\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\x00\xB5T\xCdn\x9b@
\x10...\xF8H\xAb\xA3\xCe\xBd\x07\x86w\xCa\xB1/\x06\x00\x00>>>a\xCa\xD8\xB3\x1a\x1b\xFe\xB3\x1fM\xE8\xBa\xBeD\xB6L\x9a...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}]
2015-01-11 08:48:43.675:DBUG:oeji.WriteFlusher:qtp832947102-22 -
/modular/module2.js:http://192.168.254.212:80/modular/module2.js: update
WriteFlusher@3f672bd6{WRITING}:IDLE-->WRITING
2015-01-11 08:48:43.676:DBUG:oeji.ChannelEndPoint:qtp832947102-22 -
/modular/module2.js:http://192.168.254.212:80/modular/module2.js: flushed
916 SelectChannelEndPoint@6477e11b{/192.168.254.212:54988
<->80,Open,in,out,-,W,30000,HttpConnection}{io=0,kio=0,kro=1}
2015-01-11 08:48:43.676:DBUG:oeji.WriteFlusher:qtp832947102-22 -
/modular/module2.js:http://192.168.254.212:80/modular/module2.js: update
WriteFlusher@3f672bd6{IDLE}:WRITING-->IDLE
2015-01-11 08:48:43.676:DBUG:oejs.HttpConnection:qtp832947102-22 -
/modular/module2.js:http://192.168.254.212:80/modular/module2.js:
org.eclipse.jetty.server.HttpConnection$SendCallback@7389d67c[PROCESSING][i=ResponseInfo{HTTP/1.1
200
null,-1,false},cb=org.eclipse.jetty.server.HttpChannel$CommitCallback@661c96b9]
generate: DONE ([p=350,l=350,c=8192,r=0],[p=566,l=566,c=32768,r=0],true)@END
2015-01-11 08:48:43.676:DBUG:oejs.Server:qtp832947102-22 -
/modular/module2.js: RESPONSE /modular/module2.js 200 handled=true
2015-01-11 08:48:43.676:DBUG:oejs.HttpChannelState:qtp832947102-22 -
/modular/module2.js: HttpChannelState@563202b8{s=DISPATCHED i=true a=null}
unhandle DISPATCHED
2015-01-11 08:48:43.676:DBUG:oejh.HttpParser:qtp832947102-22 -
/modular/module2.js: reset HttpParser{s=END,0 of 0}
2015-01-11 08:48:43.676:DBUG:oejh.HttpParser:qtp832947102-22 -
/modular/module2.js: END --> START
--
Andrew Penhorwood
[email protected]
www.coldbits.com
_______________________________________________
jetty-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from
this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users