headers should not be replaced as they are unlikely to change between requests and can mess up the output when the encoding is incorrect