removed bytearray skipping from `to_bytes()`
try to encode headers to 'latin1' charset
do not try to use functools.ifilter
optimized response generation