diff --git a/requests_toolbelt/utils/dump.py b/requests_toolbelt/utils/dump.py index 23b35e7..fcec64e 100644 --- a/requests_toolbelt/utils/dump.py +++ b/requests_toolbelt/utils/dump.py @@ -98,7 +98,7 @@ def _dump_response_data(response, prefixes, bytearr): _coerce_to_bytes(response.reason) + b'\r\n') headers = raw.headers - for name in headers.keys(): + for name in headers: for value in headers.getlist(name): bytearr.extend(prefix + _format_header(name, value))