disable gzip compression in debug mode

dumping raw gzip compressed data on STDERR does not help much
move setting HTTP headers to a separate method

to make rubocop happy
Merge pull request #148 from lslezak/no_gzip_in_debug_mode

Disable gzip compression in debug mode