title: Making sense of Apache HttpClient wire log from response
body: <p>My application is using Apache HTTPClient 4.3.5 that sends HTTP request and gets response.</p>
  
  <p>I am trying to figure out what response the app received.</p>
  
  <p>Below is the log snippet - </p>
  
  <pre><code>[Jan 04 2015 05:38:14.109 AM] DEBUG wire:72 - http-outgoing-2 &gt;&gt; "POST /app HTTP/1.1[\r][\n]"
  [Jan 04 2015 05:38:14.109 AM] DEBUG wire:72 - http-outgoing-2 &gt;&gt; "User-Agent: Mozilla/5.0[\r][\n]"
  [Jan 04 2015 05:38:14.109 AM] DEBUG wire:72 - http-outgoing-2 &gt;&gt; "Content-Length: 47[\r][\n]"
  [Jan 04 2015 05:38:14.109 AM] DEBUG wire:72 - http-outgoing-2 &gt;&gt; "Content-Type: application/x-www-form-urlencoded[\r][\n]"
  [Jan 04 2015 05:38:14.109 AM] DEBUG wire:72 - http-outgoing-2 &gt;&gt; "Host: test.com[\r][\n]"
  [Jan 04 2015 05:38:14.109 AM] DEBUG wire:72 - http-outgoing-2 &gt;&gt; "Connection: Keep-Alive[\r][\n]"
  [Jan 04 2015 05:38:14.110 AM] DEBUG wire:72 - http-outgoing-2 &gt;&gt; "Accept-Encoding: gzip,deflate[\r][\n]"
  [Jan 04 2015 05:38:14.110 AM] DEBUG wire:72 - http-outgoing-2 &gt;&gt; "[\r][\n]"
  [Jan 04 2015 05:38:14.489 AM] DEBUG wire:72 - http-outgoing-2 &lt;&lt; "HTTP/1.1 200 OK[\r][\n]"
  [Jan 04 2015 05:38:14.489 AM] DEBUG wire:72 - http-outgoing-2 &lt;&lt; "Server: nginx[\r][\n]"
  [Jan 04 2015 05:38:14.490 AM] DEBUG wire:72 - http-outgoing-2 &lt;&lt; "Date: Sun, 04 Jan 2015 10:37:31 GMT[\r][\n]"
  [Jan 04 2015 05:38:14.490 AM] DEBUG wire:72 - http-outgoing-2 &lt;&lt; "Content-Type: text/html;charset=UTF-8[\r][\n]"
  [Jan 04 2015 05:38:14.490 AM] DEBUG wire:72 - http-outgoing-2 &lt;&lt; "Transfer-Encoding: chunked[\r][\n]"
  [Jan 04 2015 05:38:14.490 AM] DEBUG wire:72 - http-outgoing-2 &lt;&lt; "Connection: keep-alive[\r][\n]"
  [Jan 04 2015 05:38:14.490 AM] DEBUG wire:72 - http-outgoing-2 &lt;&lt; "Vary: Accept-Encoding[\r][\n]"
  [Jan 04 2015 05:38:14.490 AM] DEBUG wire:72 - http-outgoing-2 &lt;&lt; "Pragma: no-cache[\r][\n]"
  [Jan 04 2015 05:38:14.490 AM] DEBUG wire:72 - http-outgoing-2 &lt;&lt; "Expires: Thu, 01 Jan 1970 00:00:00 GMT[\r][\n]"
  [Jan 04 2015 05:38:14.491 AM] DEBUG wire:72 - http-outgoing-2 &lt;&lt; "Cache-Control: no-cache[\r][\n]"
  [Jan 04 2015 05:38:14.491 AM] DEBUG wire:72 - http-outgoing-2 &lt;&lt; "Cache-Control: no-store[\r][\n]"
  [Jan 04 2015 05:38:14.491 AM] DEBUG wire:72 - http-outgoing-2 &lt;&lt; "Set-Cookie: JSESSIONID=0C1444D7E0FA6B0F3CCE20AFBA28237E; Path=/; HttpOnly[\r][\n]"
  [Jan 04 2015 05:38:14.491 AM] DEBUG wire:72 - http-outgoing-2 &lt;&lt; "Front-End-Https: on[\r][\n]"
  [Jan 04 2015 05:38:14.491 AM] DEBUG wire:72 - http-outgoing-2 &lt;&lt; "Content-Encoding: gzip[\r][\n]"
  [Jan 04 2015 05:38:14.491 AM] DEBUG wire:72 - http-outgoing-2 &lt;&lt; "[\r][\n]"
  [Jan 04 2015 05:38:14.491 AM] DEBUG wire:72 - http-outgoing-2 &lt;&lt; "37[\r][\n]"
  [Jan 04 2015 05:38:14.492 AM] DEBUG wire:72 - http-outgoing-2 &lt;&lt; "[0x1f][0x8b][0x8][0x0][0x0][0x0][0x0][0x0][0x0][0x3][0xb3])J-.[0xc8][0xcf]+N[0xb5][0xe3][0xb2][0x81]1[0xe3][0x93][0xf3]S[0x80][0xfc][0xe0][0xd2][0xe4][0xe4][0xd4][0xe2]b.[0x1b]}4[0x9][0x84][0x80][0x1d][0x17][0x0]&lt;Xn]@[0x0][0x0][0x0][\r][\n]"
  [Jan 04 2015 05:38:14.492 AM] DEBUG wire:72 - http-outgoing-2 &lt;&lt; "0[\r][\n]"
  [Jan 04 2015 05:38:14.492 AM] DEBUG wire:72 - http-outgoing-2 &lt;&lt; "[\r][\n]"
  </code></pre>
  
  <p>At first, I thought "[0x1f][0x8b][0x8][0x0][0x0]..." is hex string but there are non-hex string such as ")J-." and "+N." and each debug line is ending with "[\r][\n]". How would I be able to determine what response the app received.</p>
  
  <p>I have spent quite few hours trying to find the answer but was unsuccessful.</p>
  
  <p>Does it have to do anything with gzip compression or chunked transfer encoding?</p>
  
  <p>Your help would be greatly appreciated if you could answer it.</p>
  
  <p>Thanks,<br>
  James</p>