mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-08 16:53:23 +00:00
Don't write header values multiple times.
On Python 3, response.msg.keys() contains the same value multiple times if there are multiple headers with the same value. Work around this by converting to a set before iterating over it.
This commit is contained in:
@@ -28,7 +28,7 @@ def get_header_items(message):
|
||||
|
||||
|
||||
def get_headers(response):
|
||||
for key in response.msg.keys():
|
||||
for key in set(response.msg.keys()):
|
||||
if six.PY3:
|
||||
yield key, response.msg.get_all(key)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user