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
This commit is contained in:
Sebastian Bazley 2008-12-01 11:47:46 +00:00
parent d06ecc08e7
commit b2902f1ca0
1 changed files with 4 additions and 0 deletions

View File

@ -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());
}
}