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