moved get_content_type() ahead of get_content_transfer_encoding()