puppetlabs/puppet — pull request #3163 by joshcooper (2014-10-06 20:22:42+00:00)
Title: (PUP-3352) Always accept compressed content

Previously, the agent was inconsistent in how it handled HTTP compression. By default, the agent would accept compressed content from the forge, but not from the puppet master, and there were different settings controlling those behaviors.

These commits remove the `zlib` and `http_compression` settings. If the agent's ruby has compression support (as determined by requiring `zlib`), then the agent will set the `Accept-Encoding` header to `'gzip; q=1.0, deflate; q=1.0; identity'` indicating that it accepts compressed content.

If the agent's ruby does not support compression, then the agent will not set the `Accept-Encoding` header.

Note, puppet used to specify different q values when connecting to master & forge, and this PR doesn't change that.

Also, this PR should not cause a regression in PUP-1680, because that issue occurred when ruby could require `zlib`, but puppet didn't specify an `Accept-Encoding` header. However, now if ruby can require `zlib` then we always specify the `Accept-Encoding` header.