Index: src/com/caucho/hessian/client/HessianProxy.java =================================================================== --- src/com/caucho/hessian/client/HessianProxy.java (revision 7370) +++ src/com/caucho/hessian/client/HessianProxy.java (working copy) @@ -298,6 +298,7 @@ protected void addRequestHeaders(HessianConnection conn) { conn.addHeader("Content-Type", "x-application/hessian"); + conn.addHeader("Accept-Encoding", "deflate"); String basicAuth = _factory.getBasicAuth(); Index: src/com/caucho/hessian/client/HessianURLConnection.java =================================================================== --- src/com/caucho/hessian/client/HessianURLConnection.java (revision 7370) +++ src/com/caucho/hessian/client/HessianURLConnection.java (working copy) @@ -57,6 +57,9 @@ import java.io.IOException; import java.io.FileNotFoundException; +import java.util.zip.Inflater; +import java.util.zip.InflaterInputStream; + /** * Internal connection to a server. The default connection is based on * java.net @@ -179,7 +182,15 @@ public InputStream getInputStream() throws IOException { - return _conn.getInputStream(); + String contentEncoding = _conn.getContentEncoding(); + if ("deflate".equals(contentEncoding)) + { + return new InflaterInputStream(_conn.getInputStream(), new Inflater(true)); + } + else + { + return _conn.getInputStream(); + } } /**