Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

Commit ba65163

Browse files
author
ex3me0
authored
Fixed case, where "reason" absent
1 parent acc6f20 commit ba65163

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hyper/http11/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def parse_response(self, buffer):
4949
if index == -1:
5050
return None
5151

52-
version, status, reason = temp_buffer[0:index].split(None, 2)
52+
version, status, reason = (temp_buffer[0:index].split(None, 2) + [''])[:3]
5353
if not version.startswith(b'HTTP/1.'):
5454
raise ParseError("Not HTTP/1.X!")
5555

0 commit comments

Comments
 (0)