tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1143150 - /tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/GzipInterceptor.java
Date Tue, 05 Jul 2011 17:28:44 GMT
Author: markt
Date: Tue Jul  5 17:28:44 2011
New Revision: 1143150

URL: http://svn.apache.org/viewvc?rev=1143150&view=rev
Log:
Review comments

Modified:
    tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/GzipInterceptor.java

Modified: tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/GzipInterceptor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/GzipInterceptor.java?rev=1143150&r1=1143149&r2=1143150&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/GzipInterceptor.java (original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/GzipInterceptor.java Tue
Jul  5 17:28:44 2011
@@ -82,11 +82,12 @@ public class GzipInterceptor extends Cha
      * @throws IOException
      */
     public static byte[] decompress(byte[] data) throws IOException {
-        ByteArrayOutputStream bout = new ByteArrayOutputStream();
+        ByteArrayOutputStream bout =
+            new ByteArrayOutputStream(DEFAULT_BUFFER_SIZE);
         ByteArrayInputStream bin = new ByteArrayInputStream(data);
         GZIPInputStream gin = new GZIPInputStream(bin);
         byte[] tmp = new byte[DEFAULT_BUFFER_SIZE];
-        int length = 0;
+        int length = gin.read(tmp);
         while (length > -1) {
             bout.write(tmp, 0, length);
             length = gin.read(tmp);



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


Mime
View raw message