Fix crash when there are no response headers. (#366)

Found by manual testing with demo_server.
This commit is contained in:
marina-p 2021-10-07 13:47:06 -07:00 коммит произвёл GitHub
Родитель dce7b31ef1
Коммит f592553aab
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -91,6 +91,9 @@ class HttpResponse(object):
"""
headers_dict = {}
if self.headers is None:
return headers_dict
for header in self.headers:
payload_start_idx = header.index(":")
try: