HttpClient-Cache doesn't work against HttpClient 4.0 because it uses
org.apache.http.util.EntityUtils.consume(org.apache.http.HttpEntity) which
wasn't introduced until HttpClient 4.1.
Since Android uses HttpClient 4.0 (yes, it sucks that they won't upgrade,
and I don't understand their reasons for not upgrading, but anyways), this
means you can't use HttpClient-Cache on Android - and IMHO, it would be
really useful.
Could HttpClient-Cache simply not use
org.apache.http.util.EntityUtils.consume and therefore set the minimum
HttpClient version to 4.0? The change seems quite simple - in
ResponseProtocolCompliance, use this method body instead of the existing
one:
private void consumeBody(HttpResponse response) throws IOException {
HttpEntity body = response.getEntity();
if (body != null){
if (body.isStreaming()) {
InputStream instream = body.getContent();
if (instream != null) {
instream.close();
}
}
}
Thank you,
~Craig
--
View this message in context:
http://old.nabble.com/HttpClient-Cache-release-that-works-against-HttpClient-4.0--tp32775131p32775131.html
Sent from the HttpClient-User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]