hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r722043 - /httpcomponents/httpclient/trunk/module-client/src/examples/org/apache/http/examples/client/ClientGZipContentCompression.java
Date Mon, 01 Dec 2008 11:47:48 GMT
Author: sebb
Date: Mon Dec  1 03:47:46 2008
New Revision: 722043

URL: http://svn.apache.org/viewvc?rev=722043&view=rev
Log:
Add code to show that Gzip worked

Modified:
    httpcomponents/httpclient/trunk/module-client/src/examples/org/apache/http/examples/client/ClientGZipContentCompression.java

Modified: httpcomponents/httpclient/trunk/module-client/src/examples/org/apache/http/examples/client/ClientGZipContentCompression.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-client/src/examples/org/apache/http/examples/client/ClientGZipContentCompression.java?rev=722043&r1=722042&r2=722043&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-client/src/examples/org/apache/http/examples/client/ClientGZipContentCompression.java
(original)
+++ httpcomponents/httpclient/trunk/module-client/src/examples/org/apache/http/examples/client/ClientGZipContentCompression.java
Mon Dec  1 03:47:46 2008
@@ -108,6 +108,8 @@
 
         System.out.println("----------------------------------------");
         System.out.println(response.getStatusLine());
+        System.out.println(response.getLastHeader("Content-Encoding"));
+        System.out.println(response.getLastHeader("Content-Length"));
         System.out.println("----------------------------------------");
 
         HttpEntity entity = response.getEntity();
@@ -115,6 +117,8 @@
         if (entity != null) {
             String content = EntityUtils.toString(entity);
             System.out.println(content);
+            System.out.println("----------------------------------------");
+            System.out.println("Uncompressed size: "+content.length());
         }
     }
 



Mime
View raw message