0
我想知道如何響應在Python 3中的JavaScript websocket握手,我似乎無法弄清楚我應該如何在服務器端做出響應。我從我的客戶端網頁申請:Python服務器Websocket握手響應
GET/HTTP/1.1
Host: localhost:8080
Connection: Upgrade
Pragma: no-cache
Cache-Control: no-cache
Upgrade: websocket
Origin: http://www.w3schools.com
Sec-WebSocket-Version: 13
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8
Sec-WebSocket-Key: euv7CmNNT22p59HbD3X7ww==
Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits
我可以告訴大家,我proably不會在意這個最,我只需要知道什麼HTTP頭和這樣的發送,這樣我可以設置此的WebSocket向上。謝謝!