/wro4j-core/src/main/java/ro/isdc/wro/http/GzipFilter.java
countingStream.close ( ) ;
final ByteArrayOutputStream baos = new ByteArrayOutputStream(); final CountingOutputStream countingStream = new CountingOutputStream(new GZIPOutputStream(new BufferedOutputStream( baos))); final HttpServletResponseWrapper wrappedResponse = new RedirectedStreamServletResponseWrapper(countingStream, response); chain.doFilter(req, wrappedResponse); <extra_id_0> response.setContentLength(countingStream.getCount()); if (countingStream.getCount() > 0) { IOUtils.write(baos.toByteArray(), response.getOutputStream()); } } private boolean isGzipAllowed(final HttpServletRequest request) {