heroku/databasedotcom — pull request #72 by campbell (2012-03-20 14:53:19+00:00)
Title: Add http compression

The Salesforce server supports compressed data transfers by setting the appropriate request header: http://www.salesforce.com/us/developer/docs/api_rest/Content/intro_rest_compression.htm

This patch adds a header that tells the server that gzipped responses are okay, then decompresses the response if necessary. With this in place, the data returned by salesforce is typically compressed by 60-90%.

Please note that applying this patch after my two previous patches will result in some merge conflicts. This is because I have isolated each patch instead of basing this patch on a previous one. The merge conflict occurs because this patch and the others want to add code in the same place, so the later merge thinks that it is replacing code from a previous patch. To resolve the conflict, simply keep the code from all of the patches.