This change adds support for gzip encoding on HTTP responses. Gzip encoding is used when the client sets the 'accept-encoding: gzip' header. Original change by @brianosaurus, with fixes from @SjonHortensius.