Does the library Apache Commons HttpClient support Gzip? We wanted to use enable gzip compression on our Apache server to speed up the client/server communications (we have a php page that allows our Android application to sync files with the Server).
+2
A:
It has no support for this out-of-the-box, and it seems unlikely to be added to HttpClient 3.x (see rather bitchy JIRA issue here). You can, however, do it by adding custom request readers and manual request/response stream handling, layered on top of the basic library, but it's fiddly.
It seems you can do it with HttpClient 4, but not without some effort.
Pretty shoddy, if you ask me, this stuff really should be easier than it is.
skaffman
2010-05-05 21:59:35
+1 for the entertaining read (!)
karim79
2010-05-05 22:03:13
@karim79: I've abandoned any hope that HttpClient is being maintained by anyone with a grip on reality (as if the HttpClient 4 API wasn't evidence enough).
skaffman
2010-05-05 22:39:59
+2
A:
Apache HttpClient 4.1 supports content compression out of the box along with many other features that were previously considered out of scope.
oleg
2010-05-07 16:35:13
A:
Apache Commons HttpClient it has no support for this out-of-the-box, but you can easily do it with Apache HttpCore 4.0.1
Dany
2010-09-01 15:23:50