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

Commit 78d44bc

Browse files
committed
Fix checking of header in response to HTTP upgrade request
1 parent 329372f commit 78d44bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hyper/http11/connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def get_response(self):
175175
self._sock.advance_buffer(response.consumed)
176176

177177
if (response.status == 101 and
178-
b'upgrade' in headers['connection'] and H2C_PROTOCOL.decode('utf-8') in headers['upgrade']):
178+
b'upgrade' in headers['connection'] and H2C_PROTOCOL.encode('utf-8') in headers['upgrade']):
179179
raise HTTPUpgrade(H2C_PROTOCOL, self._sock)
180180

181181
return HTTP11Response(

0 commit comments

Comments
 (0)