_handshake._get_handshake_headers: Use list literal
This commit is contained in:
parent
3f9e8bf9fb
commit
a49a3c22df
@ -73,10 +73,11 @@ def handshake(sock, hostname, port, resource, **options):
|
||||
|
||||
|
||||
def _get_handshake_headers(resource, host, port, options):
|
||||
headers = []
|
||||
headers.append("GET %s HTTP/1.1" % resource)
|
||||
headers.append("Upgrade: websocket")
|
||||
headers.append("Connection: Upgrade")
|
||||
headers = [
|
||||
"GET %s HTTP/1.1" % resource,
|
||||
"Upgrade: websocket",
|
||||
"Connection: Upgrade"
|
||||
]
|
||||
if port == 80:
|
||||
hostport = host
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user