From b2902f1ca000bb02ff2953bf8d1584cbcf94e43b Mon Sep 17 00:00:00 2001 From: Sebastian Bazley Date: Mon, 1 Dec 2008 11:47:46 +0000 Subject: [PATCH] Add code to show that Gzip worked git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@722043 13f79535-47bb-0310-9956-ffa450edef68 --- .../http/examples/client/ClientGZipContentCompression.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/module-client/src/examples/org/apache/http/examples/client/ClientGZipContentCompression.java b/module-client/src/examples/org/apache/http/examples/client/ClientGZipContentCompression.java index c713c05d9..b047b4fc3 100644 --- a/module-client/src/examples/org/apache/http/examples/client/ClientGZipContentCompression.java +++ b/module-client/src/examples/org/apache/http/examples/client/ClientGZipContentCompression.java @@ -108,6 +108,8 @@ public class ClientGZipContentCompression { 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 @@ public class ClientGZipContentCompression { if (entity != null) { String content = EntityUtils.toString(entity); System.out.println(content); + System.out.println("----------------------------------------"); + System.out.println("Uncompressed size: "+content.length()); } }