diff --git a/hyper/http20/response.py b/hyper/http20/response.py index 408c8c36..71b4fc50 100644 --- a/hyper/http20/response.py +++ b/hyper/http20/response.py @@ -62,10 +62,12 @@ def __init__(self, headers, stream): self.reason = '' # The response headers. These are determined upon creation, assigned - # once, and never assigned again. - # This conversion to dictionary is unwise, as there may be repeated - # keys, but it's acceptable for an early alpha. - self._headers = dict(headers) + # once, and never assigned again. If a header name is repeated, its + # values are concatenated with ``,``. + list_headers = {} + for name, value in headers: + list_headers.setdefault(name, []).append(value) + self._headers = {name: ','.join(value) for name, value in list_headers.items()} #: The status code returned by the server. self.status = int(self._headers[':status'])