Increase join concat performance (#2291)

This commit is contained in:
Adam Hopkins 2021-10-29 12:55:09 +03:00 committed by GitHub
parent a361b345ad
commit 36e6a6c506
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -138,7 +138,7 @@ class WebSocketProtocol(HttpProtocol):
).encode() ).encode()
rbody = bytearray(first_line) rbody = bytearray(first_line)
rbody += ( rbody += (
"".join(f"{k}: {v}\r\n" for k, v in resp.headers.items()) "".join([f"{k}: {v}\r\n" for k, v in resp.headers.items()])
).encode() ).encode()
rbody += b"\r\n" rbody += b"\r\n"
if resp.body is not None: if resp.body is not None: