title: HttpUrlConnection reading chunked response
body: <p>I'm working on a project where i have to use <em>HttpUrlConnection</em> (Android~) for reading the input stream. </p>
  
  <p>It turns out that when i'm reading the input stream the data is malformed and has a bigger size from the original content (which is sent by the server). Now, the server response header contains both <strong>"Content-Length"</strong> and <strong>"Transfer-Encoding: chunked"</strong>, which from what i know is an issue as both of them shouldn't coexist. </p>
  
  <p>Aside from that the input stream received from <em>HttpUrlConnection</em> contains all body content (with chunks offset informations).</p>
  
  <p>I have two questions:</p>
  
  <ul>
  <li>Shouldn't the <em>HttpUrlConnection</em> handle chunked data?</li>
  <li>How to get the data from input stream without chunked informations?</li>
  </ul>