Tests: improved response receiving while upgrade.
The patch required to process non-101 response.
This commit is contained in:
@@ -58,10 +58,7 @@ class TestApplicationWebsocket(TestApplicationProto):
|
|||||||
|
|
||||||
resp += sock.recv(4096).decode()
|
resp += sock.recv(4096).decode()
|
||||||
|
|
||||||
if (
|
if (resp.startswith('HTTP/') and '\r\n\r\n' in resp):
|
||||||
re.search('101 Switching Protocols', resp)
|
|
||||||
and resp[-4:] == '\r\n\r\n'
|
|
||||||
):
|
|
||||||
resp = self._resp_to_dict(resp)
|
resp = self._resp_to_dict(resp)
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user