Fix WebSocketException: Invalid header

This commit is contained in:
tomkat83 2017-02-26 17:17:39 +01:00
parent fdd07b77e3
commit 39d3e8acc9

View file

@ -485,7 +485,7 @@ class WebSocket(object):
headers.append("")
headers.append("")
header_str = "\n".join(headers)
header_str = "\r\n".join(headers)
self._send(header_str)
if traceEnabled:
log.debug("--- request header ---")
@ -530,7 +530,7 @@ class WebSocket(object):
while True:
line = self._recv_line()
if line == "\n":
if line == "\r\n":
break
line = line.strip()
if traceEnabled: