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

Commit 0c02064

Browse files
committed
Fix header parsing bug.
1 parent 5fd6731 commit 0c02064

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

hyper/http20/response.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ def __init__(self, headers, stream):
1919
#: HTTP/2.0, and so is always the empty string.
2020
self.reason = ''
2121

22-
#: The status code returned by the server.
23-
self.status = int(headers[':status'])
24-
del headers[':status']
25-
2622
# The response headers. These are determined upon creation, assigned
2723
# once, and never assigned again.
2824
# This conversion to dictionary is unwise, as there may be repeated
2925
# keys, but it's acceptable for an early alpha.
3026
self._headers = dict(headers)
3127

28+
#: The status code returned by the server.
29+
self.status = int(self._headers[':status'])
30+
del self._headers[':status']
31+
3232
# The stream this response is being sent over.
3333
self._stream = stream
3434

0 commit comments

Comments
 (0)