square/okhttp — pull request #248 by kriswuollett (2013-07-12 06:20:28+00:00)
Title: Added contentType/Encoding to HttpResponse's Entity.

Clients should expect that HttpResponse Entity's contentType and contentEncoding are not null when the headers are present. Added unit tests to cover various combinations of Content-Type and Content-Encoding along with transparent gzip handling.

I moved the 5 responseBody/entity lines up in OkApacheClient so that BasicHeader objects were not created again behind the scenes while setting the entity's contentType and contentEncoding.