Kill fileno() (was only used in logging) and unused var h_t_enc.
Kill get_header() in favor of a plain dict with lowercase keys.