wrap the original headers with the httpheadersdict to preserve multiple headers that have the same name response super buildresponsereq resp response headers httpheadersdictgetattrresp headers return response wrap the original headers with the httpheadersdict to preserve multiple headers that have the same name
from httpie.cli.dicts import HTTPHeadersDict
from requests.adapters import HTTPAdapter


class HTTPieHTTPAdapter(HTTPAdapter):

    def build_response(self, req, resp):
        

        response = super().build_response(req, resp)
        response.headers = HTTPHeadersDict(getattr(resp, 'headers', {}))
        return response