mikeal/request — pull request #960 by kevinoid (2014-07-08 14:03:45+00:00)
Title: Support gzip with encoding on node pre-v0.9.4

This pull request addresses an oversight from #951 that before 0.9.4 `zlib` streams did not support the `setEncoding` method. This means that on these versions of node, using the `encoding` and `gzip` options together would cause an error and result in test failures on these versions.

This pull request addresses the issue by chaining the zlib stream with a [stringstream](https://www.npmjs.org/package/stringstream) when both the `encoding` and `gzip` options are specified and `setEncoding` is not available on the zlib stream.